Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT Statement
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00513062
Message ID:
00513262
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
>>>i think i gave you points for helping....
>>
>>Thanks, I didn't notice them before... BTW, AFAIK like is not optimizable (I have to check it again), while = is optimizable operator. If you have index on lastname, use pat_lName=m.lcValue. Don't use alltrim in the SQL unless you don't want to change ANSI settings. You can do:
>>
>>local lcValue, lcOldAnsi
>>lcOldAnsi=set('ansi')
>>set ansi off && to perfomr partial match
>>lcValue=alltrim(thisform....)
>>select ... where pat_lName=m.lcValue ...
>>if lcOldAnsi='ON'
>>   set ansi on && restore it back
>>endif
>
>According to SYS(3054,1), you get partial Rushmore optimization using LIKE instead of and equal sign. Of course, you have to have an index tag on the expression used on the left side of the equation.

Yep, I just tried:
sys(3054,1)
select * from lender where short like "A%" && Partial
set ansi off
select * from lender where short="A"
&& Full

But why it's partial? It uses short index in both cases...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform