Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Taking Long time to generate Query Plan

Author  Topic 

Jothikannan
Starting Member

36 Posts

Posted - 2006-03-16 : 11:11:32
i want to check the Query Plan of a Stored Procedure.
i am using Query analyzer to Generate the plan (Ctl+L)
But it taking more than 11 hours to a Generate query Plan...


Is any one know why it taking very Long time ?

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-03-16 : 13:24:02
the plan it finally comes up with should be darn good. Give it another day or so and let us know how efficient it is.

Ok, I'm totally kidding. There is something else going on. Cancel the request if by some reason you're still waiting for it to finish. Are other statments executing? Do you have a DBA around to "check things out"?

Be One with the Optimizer
TG
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-03-16 : 14:01:49
See if anything is being blocked.
I've only ever seen this with a lot of nested views.

If it hasn't completed then I doubt if it's going to.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Jothikannan
Starting Member

36 Posts

Posted - 2006-03-17 : 02:43:07
Thanks for ur suggestion
when i execute the procedure its taking only 20 to 40 seconds,inside the procedure there is no any Complex views,But that procedure is having 5000 lines and inside that its calling some other Procedures.
In that calling procedures also there is no such complex view but they also having 3000 to 5000 lines......

and no one blocked my query

i donot understand .....why that particular taking Long time consistently to generate plan???
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-03-17 : 07:28:08
I suspect it's not going to make it.
Something that size usually has temp tables which will stop it gettnig an estimated plan (will error).

If it executes that quickly why not display the actual plan?


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Jothikannan
Starting Member

36 Posts

Posted - 2006-03-17 : 11:37:57
Thanks for ur suggestion.If u get any other info related ,please let me know.
Go to Top of Page
   

- Advertisement -