>I read with great interest your FAQ.
>Does it mean that in the where clause of a SQL, VFP will process based on the sequence in which the conditions are laid out? I was always under the impression that I should "narrow down" the records based on the largest subset working towards the smallest.
>In your article, it looks like its better to "narrow down" using the smallest subset...
>Yau
Not necessarily. I understand that if you have a combined condition, for instance:
... FOR Field1 = Value1 AND Field2 = Value2
If you have an index for any of the two fields (Field1 or Field2), but not for the other, that part will be obtained first (from the information in the index).
I believe that if you have an index on both fields, the order shouldn't matter: VFP will have to get information from the index for both fields, anyway.
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)