Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Proc runs slow in VFP
Message
From
23/12/2003 12:03:17
 
 
To
22/12/2003 15:50:09
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00861404
Message ID:
00861674
Views:
19
>In VFP 8, if I simply:
>
>s=seconds()
>c=sqlconnect('sql')
>=sqlexec(c,'open_inventory 11222','temp')
>?seconds()-s
>
>it takes about 1.3 seconds to execute the stored procedure.
>
>If I go into Query Analyzer and type:
>
>open_inventory 11222
>
>it instantly returns the query (probably less than .1 seconds).
>
>Any idea why VFP is so much slower?

Well, a few things...

One, the above is timing the time to connect and to run the query. I assume in QA you are just talking about the query time. Change your code to:
c=sqlconnect('sql')
s=seconds()
=sqlexec(c,'open_inventory 11222','temp')
?seconds()-s
Two, how is your connection set up? Does it use (local) as the server name?

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform