Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Just SqlExec() or SqlPrepare() + SqlExec()?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00597110
Message ID:
00597187
Vues:
15
Hi!

Probably because you use a parameter in the query. Parametrised query could not be prepared at the server side, as far as I know. This is only for static queries.


>Hi J. Flores!
>
>My friend make tests... Take a look:
>
>
>* Test ONE
>t1 = seconds()
>FOR x = 1 to 8000
>   codigo_cliente = x
>   SQLEXEC(sql_connection,"Select * FROM authors WHERE codigo
>=?codigo_cliente","tmpCursor")
>NEXT x
>wait window transform(seconds() - t1)
>* Test TWO
>t1 = seconds()
>sqlprepare(sqlserver_handle,"Select * FROM authors WHERE codigo
>=?codigo_cliente","tmpCursor")
>FOR x = 1 to 8000
>   codigo_cliente = x
>   SQLEXEC(sqlserver_handle)
>NEXT x
>wait window transform(seconds() - t1)
>
>
>So... The results:
>
>just SQLExec = 7,291 seconds
>SQLPrepare + SQLExec = 7,631 seconds
>
>Why?... :-)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform