Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore optimization
Message
De
23/02/2005 16:37:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
00989848
Message ID:
00989854
Vues:
19
inlist() is quite a bit shorter, and should be optimizable:
... where inlist(Status, "A", "F", "T", "H", "E", "W")

>Hi
>
>I have a large table with a status field and I want to select the records for a group os status's.
>the table is indexed on the status
>
>this can be done by
><pre>lcStatusList = 'AFTHEW'
>SELECT* ;
>FROM mytable ;
>WHERE mytable.status $ ?lcStatusList
>
>Unfortunately, this does not optimize.
>
>Is there any way to fully optimize this query without expanding the Select to something like
>
>
SELECT* ;
>FROM mytable ;
>WHERE mytable.status = 'A' OR ;
>	mytable.status = 'F' OR ;
>	mytable.status = 'T' OR ;
>	mytable.status = 'H' OR ;
>	mytable.status = 'E' OR ;
>	mytable.status = 'W'
>
>regards
>Geoff Scott
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform