Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quirky Behavior
Message
De
03/07/2001 14:23:58
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
03/07/2001 13:43:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00526385
Message ID:
00526422
Vues:
17
>>A former programmer at my company had applied an alltrim to an indexed field. When I removed the alltrim the report that uses the field ran several times faster. This alltrim seemingly nullified the index on the field. Is there any explaination to this?
>>
>>Thanks for all replies.
>>
>>Mike
>
>Yea, I think so...
>
>The program itself was most probably *NOT* using the ALLTRIM(IndexedFieldName) expression in its FOR or WHERE clause(s).
>
>You'll want to make sure that there are not other parts of the application that slowdown because of your change, and if they do then I suggest that you change them to remove the ALLTRIM() in their expressions also .
>
>It is general concensus that ALLTRIM() is NOT useful/sensible in a TAG expression anyway, so your first step was a good one (though no doubt lucky too).
>
>good luck,
>
>JimN

Michael,

To go a little further with what JimN says, unless you've got spaces at the beginning of your field, the ALLTRIM() is useless. As Craig pointed out, VFP uses fixed-length indexes, so the key value will be padded back out to the maximum field size.

You can, however, seek on a value that is less than the total length of the field, but whether FOUND() is .T. will depend on your settings.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform