Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How this query will fast
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01468545
Message ID:
01468693
Vues:
73
Your index on the table needs to match the query var as in Upper(trim(word))=Upper(trim(.....



>>>>How this query will work fast. It has 37000 records, and takes .28 time to load.
>>>>
>>>> thisform.container6.searche.RecordSourceType=4  &&grid
>>>> 
>>>>     thisform.container6.searche.RecordSource = "select word,ur from dict "+;
>>>>                " where UPPER(word) = Upper(Trim(thisform.container6.texte.Value))"+;
>>>>                " order by word into cursor SYS(2015)  "
>>>>
>>>
>>>It may be a better idea to use the cursor for the recordSource.
>>>
>>>select word,ur from dict  where UPPER(word) = Upper(Trim(thisform.container6.texte.Value)) ;
>>> order by word into cursor crsGrid nofilter
>>>
>>>Also your table should have an index on UPPER(word) so the query will be Rushmore optimizable.
>>no change in time
>
>You can also change the query to use local variable rather than thisform property, e.g.
>
>
>lcValue = Upper(Trim(thisform.container6.texte.Value))
>select word,ur from dict  where UPPER(word) = m.lcValue ;
> order by word into cursor crsGrid nofilter
>
>There is nothing much you can do in addition to speed up this simple query.
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform