Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
It's worked for several years at least.
>>>>First of all, you should not have an index on alltrim(something), since this will give you a variable expression length. VFP doesn't support this, and it will put an almost arbitrary length (actually based on the first record it finds, I think).
>>>
>>>Hilmar,
>>>This is not true for indexes on normal fields. Because VFP has fixed length fields, the index key will be stored as if a PADR(< alltrim(field value) >,< field width >) was executed on it. Alltrim() has detrimental effects when dealing with memo fields because they are variable length. The first record will determine how long the index key expression will be. Everything after that will be padded or truncated as needed.
>>
>>Isn't there also an issue with concatenated field indices with alltrims. So, indexing on something like "alltrim(lastname) + alltrim(firstname)" will result in a variable length index, right? I'm almost certain that that was the case a few years ago...
>
>I don't think that's a problem anymore. I think your index would be the length of the untrimmed fields, but I'm not sure. I think it may have been a problem in the past, but I think it's dealt with now.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement