Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure always faster?
Message
De
27/07/2006 08:20:59
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
26/07/2006 21:06:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Database:
MS SQL Server
Divers
Thread ID:
01140442
Message ID:
01140635
Vues:
27
>Mike,
>
>>The dynamic SQL is 2 times faster than the SP. Can you guys confirm this?
>
>On my laptop against local SQL Server, this is what I get with your code on several runs:
Dynamic SQL: 10.948 secs   SP Call: 12.665 secs
>Dynamic SQL: 11.088 secs   SP Call: 12.720 secs
Those are with 10,000 successive queries on each -- hardly a real life comparison for a typical application. If I change it to 10 queries on each, the difference seems much less important:
Dynamic SQL: 0.012 secs   SP Call: 0.014 secs
>Dynamic SQL: 0.012 secs   SP Call: 0.013 secs
For 1 query on each:
Dynamic SQL: 0.001 secs   SP Call: 0.002 secs
>Dynamic SQL: 0.001 secs   SP Call: 0.001 secs
I'm going to disagree with that Dave. A single web server can be hit by that many people. There is nothing wrong with squeezing every ounce out of it.

The point is it is not ALWAYS faster to do an SP, regardless.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform