Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MySQL searches
Message
 
 
À
13/10/2005 14:45:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01058817
Message ID:
01058821
Vues:
15
Which part takes long, connecting to mySQL or executing query?

>I have a database on MySQL which I am building a front end application for in VFP. This database has 1.7 million records in it. If I query a record using the mySQL Query Browser, it takes 0.0173 seconds to display it. When I use the following VFP code:
>
>PUBLIC gnconnhandle, namestoup
>STORE SQLCONNECT('TestingPatient', 'myname', 'password') TO gnConnHandle
>labstm = "select * from labtest1 where upi = 00103194"
>SQLEXEC(gnconnhandle,labstm, "lab")
>SQLDISCONNECT(gnconnhandle)
>browse
>
>it takes MUCH longer...like 10-15 secs. What I cannot understand is that if I run the same VFP code on the SAME upi number, it pops up instantly. Even if I close VFP and then reopen in a new session, it appears in a split second. If I try searching for a upi that I have never searched for before, it takes a long time again.
>
>Why does this happen and how can I make the first search on a upi as fast as the subsequent searches on the same upi? The MySQL table has an index on upi....
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform