Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Procedure always faster?
Message
From
26/07/2006 21:06:39
 
 
To
26/07/2006 16:31:46
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Database:
MS SQL Server
Miscellaneous
Thread ID:
01140442
Message ID:
01140535
Views:
28
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform