Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore and composite index tag
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 SP1
Divers
Thread ID:
01304565
Message ID:
01304566
Vues:
14
>Hello fellow weekend-workers <g>,
>
>I am changing a candidate key on many of my tables from a single field to a composite expression (e.g. TBL_ID_FLD + BINTOC(TBL_INT_FLD)). My question is, do I also need to create a regular index on the TBL_ID_FLD in order for Rushmore to find records faster? That is, will Rushmore use the composite index key? (and if so, I can save on not having to create an extra index tag).
>
>Thank you in advance for any questions.


It depends what is your WHERE clause:
CLEAR
CREATE CURSOR Test (TBL_ID_FLD C(20),TBL_INT_FLD int)
INDEX ON TBL_ID_FLD + BINTOC(TBL_INT_FLD) TAG Test
SYS(3054,12)
SELECT * FROM Test;
WHERE TBL_ID_FLD = 'asdasdasda' INTO CURSOR crsTest
?
SELECT * FROM Test;
WHERE TBL_ID_FLD + BINTOC(TBL_INT_FLD) = 'asdasdasda' INTO CURSOR crsTest
?
SELECT * FROM Test;
WHERE TBL_ID_FLD LIKE 'asdasdasda%' INTO CURSOR crsTest
?
SELECT * FROM Test;
WHERE TBL_ID_FLD + BINTOC(TBL_INT_FLD) LIKE 'asdasdasda%' INTO CURSOR crsTest
INDEX ON TBL_ID_FLD  TAG Test
?
SELECT * FROM Test;
WHERE TBL_ID_FLD = 'asdasdasda' INTO CURSOR crsTest
?
SELECT * FROM Test;
WHERE TBL_ID_FLD LIKE 'asdasdasda%' INTO CURSOR crsTest
SYS(3054,12)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform