Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What does 'Precompile SQL on Backend server' mean?
Message
De
26/10/2001 19:31:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00571374
Message ID:
00574083
Vues:
43
Thanks for the explanation. Now I understand it should be used in every complex query. But, don't you think it is something that should be ON by default? In the other hand I always create views with SHARED checked ON.

Thanks a lot!!


Luis



>Hi!
>
>Assume you have a complex lookup query without or with parameters. You use this query on several forms by opening the same view with different parameters on different forms. Without pre-compiling, each time VFP send view's query to the server backend, server backend should compile that query before executing to prepare an internal code for interpreter to execute that query. This compiling takes some time. When you execute that query many times on many places, this time used for pre-compiling will count on each such query.
>
>Some backends, like SQL Server, have a feature for this - application can send a single command with query to pre-compile the query string. Then each time query is executed, backend will not compile it, it will use already compiled code.
>
>This is theoretically how work SQLPrepare() command ()prepare SQL command) and SQLEXEC() command (execute a query on remote backend). I do not know really if this option works for remote views, accordingly to help it should work. Though I suspect, in case SHARED option is used for remote views, when you open another view, pre-compiled code lost because another query executing. Anyway, SHARED option is recommended to use ecause it saves number of connections to SQL Server.
>
>Hope this makes it more clear for you...
>
>>Thanks, but I really need to know what does 'Precompile SQL on backendserver' means. It is in the View Desginer's Advanced Options. And please, show me a real-world example if possible.
>>
>>Thanks any way.
>>
>>
>>Luis
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform