Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLExec or SQLPrepare + SQLExec ???
Message
From
01/03/1999 09:47:45
 
 
To
01/03/1999 09:43:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00189574
Message ID:
00192632
Views:
17
Actually, the fastest way is to run SQLExec only against ready-to-use (compiled) back-end stored procedure.

>Hi David ---
>
>In some cases, SQLPREPARE can be a lot faster than just SQLEXEC. As far as SQL Server goes, I believe that SQLPREPARE compiles the query into SQL's memory cache of procedures. SQLEXEC alone does this and then executes.
>
>>>
>>>I was wondering...
>>>
>>>What's the difference between using:
>>>
>>>1) The SQLExec with the embedded query string
>>>2) The SQLprepare with the query string followed by an SQLExec
>>>
>>>The help mentions that SQLPrepare send the query string for
>>>compilation by the ODBC data source. This compiling is not
>>>mentionned for the SQLExec command.
>>>
>>>Does this mean that SQLExec without an SQLPrepare will
>>>run my queries slower ?
>>>
>>>Or is it just a question of personal choice?
>>>
>>>TIA
>>>
>>>Pascal
>>
>>My understanding of SQLPrepare is that it is that it compiles the SQL statement and creates the plan. Then when you run the SQLExec it will just run the plan.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform