Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STR in an index
Message
 
À
19/08/2006 13:12:15
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01146822
Message ID:
01147060
Vues:
20
Oops, I see now. You were responding to someone's statement where they said: "I don't think such a index would aid in the rushmore optimization."


>>>I'm not sure I ever did this much, if any, and so it's been awhile since I thought much about this, but isn't it going to cause a problem if you create an index on an integer field where the index expression is ALLTRIM(STR(INTEGER_FLD))? That's going to create a variable length index, correct? And I'm not sure why you would index such a field - which is the PK in the table in question - on anything other than just the field itself (in other words, the index expression just contains the field name).
>>>
>>>Russell Campbell
>>
>>I agree. I not sure, but I don't think such a index would aid in the rushmore optimization.
>
>The index tag expression and the where/for clause have to match for Rushmore optimization. It's control over the length of the index expression that's important here.
>
>So you INDEX ON PADL(ALLTRIM(STR(INTEGER_FLD)),10,'0') and you SELECT BLAH WHERE PADL(ALLTRIM(STR(INTEGER_FLD)),10,'0') = "0000000001" and it'll be fine.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform