Showing posts with label showing. Show all posts
Showing posts with label showing. Show all posts

Wednesday, March 28, 2012

Help on Showing Querry Execution Plan in SQL Server Management Studio

Hi Everybody,
I am trying to run a querry (calling a sp) in SQL Server Management
Studio and have it display the Execution Plan.
When I try to do this SQL Server creates a system tempdb table that
eats up all my physical memory (goes over 20 + gig and keeps growing
until the computer can't take it anymore and dies... I actually have
to manually get rid of that table for my computer to ba able to
runnormally again).
I am doing some research online about this but so far can't find
anything...
Is there a way I can avoid SQL server from creating that tempdb table
when I want to show the execution plan for a querry? or is there any
setting I can modify to avoid that tempdb table to keep growing?
Thanks a lot,
Taslim
PS: My computer is a P4 3.06 Ghz, 1.25 gig ram and has 24 gig free
physical memory...sqlserver uses tempdb for its workspace. so, the answer is 'no'.
from the sound of your description, this must be some sproc that does tons
of dml operations!
-oj
<taslimn@.gmail.com> wrote in message
news:1149616073.134649.115920@.h76g2000cwa.googlegroups.com...
> Hi Everybody,
> I am trying to run a querry (calling a sp) in SQL Server Management
> Studio and have it display the Execution Plan.
> When I try to do this SQL Server creates a system tempdb table that
> eats up all my physical memory (goes over 20 + gig and keeps growing
> until the computer can't take it anymore and dies... I actually have
> to manually get rid of that table for my computer to ba able to
> runnormally again).
> I am doing some research online about this but so far can't find
> anything...
> Is there a way I can avoid SQL server from creating that tempdb table
> when I want to show the execution plan for a querry? or is there any
> setting I can modify to avoid that tempdb table to keep growing?
> Thanks a lot,
> Taslim
> PS: My computer is a P4 3.06 Ghz, 1.25 gig ram and has 24 gig free
> physical memory...
>

Help on Showing Querry Execution Plan in SQL Server Management Studio

Hi Everybody,
I am trying to run a querry (calling a sp) in SQL Server Management
Studio and have it display the Execution Plan.
When I try to do this SQL Server creates a system tempdb table that
eats up all my physical memory (goes over 20 + gig and keeps growing
until the computer can't take it anymore and dies... I actually have
to manually get rid of that table for my computer to ba able to
runnormally again).
I am doing some research online about this but so far can't find
anything...
Is there a way I can avoid SQL server from creating that tempdb table
when I want to show the execution plan for a querry? or is there any
setting I can modify to avoid that tempdb table to keep growing?
Thanks a lot,
Taslim
PS: My computer is a P4 3.06 Ghz, 1.25 gig ram and has 24 gig free
physical memory...sqlserver uses tempdb for its workspace. so, the answer is 'no'.
from the sound of your description, this must be some sproc that does tons
of dml operations!
--
-oj
<taslimn@.gmail.com> wrote in message
news:1149616073.134649.115920@.h76g2000cwa.googlegroups.com...
> Hi Everybody,
> I am trying to run a querry (calling a sp) in SQL Server Management
> Studio and have it display the Execution Plan.
> When I try to do this SQL Server creates a system tempdb table that
> eats up all my physical memory (goes over 20 + gig and keeps growing
> until the computer can't take it anymore and dies... I actually have
> to manually get rid of that table for my computer to ba able to
> runnormally again).
> I am doing some research online about this but so far can't find
> anything...
> Is there a way I can avoid SQL server from creating that tempdb table
> when I want to show the execution plan for a querry? or is there any
> setting I can modify to avoid that tempdb table to keep growing?
> Thanks a lot,
> Taslim
> PS: My computer is a P4 3.06 Ghz, 1.25 gig ram and has 24 gig free
> physical memory...
>sql

Friday, February 24, 2012

Help me to understand!

Hi All,

I need to build a report which is showing client who did not order since particular period, but have ordered within the past 3 months.

Is anyone can help me to understand the technique to get that data?

Thanks in advance.

hi Ron,

you need help in query or designing the reports.

query i think will be like this

select CustomerName from Customers Where CustomerId not in (select distinct customerid from Orders where OrdDate between @.fromdt and @.todt)

and CustomerId in (Select distinct customerid from Orders where orddate betwen getdate() and dateadd(m,-3,getdate())

hope it works.

regards,

satish

|||

Thanks Satish,

It works.

|||

Hi Satish,

Now my problem is that I want just showing the customer with the last invoice date. So something like this:

CustName Inv.Date
MER01 09/06/2006
JUN01 09/30/2006

Right now, I got multiple item with the same customer since their invoice date is different. I try using MAX(InvoiceDate), but
it seems did not work out.

Any idea...

|||I solved the problem. Thanks.|||

hi ronn

see if following helps out in case you want separate query if you want with earlier one let me know but first try if you can fight a bit on your own :)

select top 1 CustomerName, InvDate from Customers Inner Join Invoice on Invoice.CustomerID = Customer.CustomerID

group by CustomerName, InvDate

order by InvDate Desc

regards,

satish