Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Terrible performance, am I crazy?
Message
 
 
To
28/09/2005 16:41:51
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
01054221
Message ID:
01054283
Views:
23
Hi Keith,

Let's first eliminate posibilty that bad execution plan cached by SQL server is responsible. You can force SQL Sewrver to recompile sproc every time by adding 'WITH RECOMPILE' to the CREATE/ALTER PROCEDURE. Alternativelly, you can issue DBCC FREEPROCCACHE before running sproc to clear cached plans.


>I've come across a weird situation. I have a stored procedure (code below), and it's fairly simple. I frequently "unroll" stored procedures to work on the execution plan. So I unrolled this one and found a huge discrepancy in the execution times between the SP and the straight select.
>
>The SP executes in 1:14 and the straight SQL executes in :12!
>
>Maybe I need another pair of eyeballs. Can you see any difference between the two?
>
<snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform