Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure always faster?
Message
De
26/07/2006 21:06:39
 
 
À
26/07/2006 16:31:46
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Database:
MS SQL Server
Divers
Thread ID:
01140442
Message ID:
01140535
Vues:
29
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
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform