Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How this query will fast
Message
 
À
13/06/2010 12:29:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
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:
01468726
Vues:
70
>>>>Your index on the table needs to match the query var as in Upper(trim(word))=Upper(trim(.....
>>>>
>>>>
>>>No, upper(word) should work fine. You don't use TRIM in indexes.
>>
>>Uh, yes I do use trim in indexes and it makes the search extremely fast. Try it before you discount it.
>
>Index expressions should be of fixed length, or otherwise, the length is unpredictable (will be based on whatever is in the first record), since Visual FoxPro will maintain a fixed length.
>
>If you do use trim(), rtrim(), or anything else that makes for a variable-length index, in part of the expression, you must pad the entire index expression to a fixed length, for example, with padr().

I use alltrim() on the index, which makes the index smaller and optimized when searching on allt(upper(thiswhatever))=allt(upper(m.thiswhatever))
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