>I've got a stored procedure that I'm trying to execute from a VFP program. If I execute the stored procedure from Query Analyzer takes less than 1 second. However, the same call performed as a SQL passthru from within a VFP application could take anywhere between 14~40 seconds. What would account for the delay?
There could be many reasons. SQL Server MVP Erland Sommarskog has a long recent article that helps to understand possible reasons
Slow in the Application, Fast in SSMS?
If it's not broken, fix it until it is.
My Blog