Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedures taking longer than ISQLW execution.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00007434
Message ID:
00007737
Vues:
33
>When I run the code piece by piece in ISQLW, it takes a while, but it
>runs correctly. When I compile it as an SP, it takes forever. (I don't
>want to include the code because it is really long). Why would that be?
>I've indexed everthing correctly and sufficiantly, but even if I didn't,
>wouldn't it take longer in ISQLW as well?

I've just been hacking away at my problem with MS SQL Server 6.0 stored procedures. I've stumbled across a couple of things I thought might be of interest to you in trying to figure out what was keeping my SPs from running correctly (see me previous post).

1.) Have you tried SET NOCOUNT ON? It's supposed to significantly increase stored procedure execution by suppressing the message at the end of each SQL statement reporting how many rows were affected by the statement.

2.) Perhaps you've been reindexing your tables and everything without recompiling your SP? Once SPs get run, they get compiled and won't get recompiled again until a) you tell SQL Server to do so, or b) SQL Server is restarted and the SP is re-run. Only then will it take advantage of any other optimizations you've run against the table(s) it references.

Hope this helps!
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform