Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Terrible performance, am I crazy?
Message
 
 
À
28/09/2005 16:41:51
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01054221
Message ID:
01054283
Vues:
24
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform