Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow SQL Through ODBC for fox database
Message
 
À
05/03/1999 00:32:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00193912
Message ID:
00194646
Vues:
21
I don't think you have a problem here....

>my bdf is of 5000 records named "A"
>i have written in fox as simple table
> select * from a
>It gives result in 0.10 seconds. sometimes in 0.00
>seconds only.

When you invoke a SQL statement like this, Fox cheats and opens the table with a USE command, which is almost instantaneous.

>for this file through ODBC i had written like
> connum = sqlconnect(constr)
> =sqlprepare(connum, "select * from A","CursA")
> =sqlexec(connum)
>
>for this it takes 3 seconds.

3 seconds to pull down 5000 records. That's pretty good if you ask me. For starters, do you really need all 5000 records. In C/S apps, rarely is it appropriate to do Select *. Rarely do you need all columns and rarely do you need all records. This should be parameterized. After all, what are you going to do when the 5000 balloons to 25000???

Much of the time I suspect is in preparing the SQL Command.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform