Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT statement executes very slow
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
Divers
Thread ID:
01376652
Message ID:
01376664
Vues:
15
You don't have to change SET ANSI in VFP9. The LIKE operator will be optimized if an index on itm_numb exists regardless of SET ANSI setting. It's also compatible with other databases.
SELECT itm_numb,itm_desc FROM A WHERE itm_numb LIKE 'STI%'
>Do you have an index on itm_numb ?
>
>If you have SET ANSI OFF, then you should be able to just use:
>
>
>SELECT itm_numb,itm_desc FROM A WHERE itm_numb='STI'
>
>
>which should take advantage of the index which you should then be able to confirm with the SYS(3054, command.
>
>
>By using SUBSTR(itm_numb,3) you're not allowing RUSHMORE to optimize unless you specifically have an index on SUBSTR(itm_numb,3)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform