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:
01469137
Vues:
44
Ah, you are correct, if you are indexing to a single idx. If you are indexing using the tag keywords, the results will be smaller.
I have a table with 1.2 million records.
If I do the following:
INDEX on ALLTRIM(UPPER(last)) TAG last
INDEX on ALLTRIM(UPPER(first)) TAG first
The resulting file size is 11,365 kb

INDEX on last TAG last
INDEX on first TAG first
The cdx file is 22,731 kb

This also strips out any leading blanks, and forces upper case.

John

>You're mistaken. VFP does not support variable length index keys. As result, an index key after ALLTRIM() will be padded back to the size of the field. Adding ALLTRIM() is not required for index to be it optimazable either because it's optimaziable w/o it already.
>
>upper(thiswhatever)) = upper(m.thiswhatever)
>
>
>The bottom line, ALLTRIM() is useless in indexes at least and dangerous at worst.
>
>>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