>Rodolfo,
>
>First of all, when you run the test for the second time VFP has cached the indexes and will re-use that information. To get an accurate evaluation you should close out of FoxPro and in some cases actually turn the machine off.
>
>Secondly, when VFP searches a table it reads the index(es) first and then retrieves the records it needs. When there is an index on a field with only a few discrete values (such as gender or yes/no) you are better off NOT having an index on that field. Then VFP will evaluate the other criteria, retrieve records, and make one final pass locally to evaluate the yes/no field.
>
>There was an article in FoxPro Advisor about this issue, but it's not available online. It's May, 1999, "Rushmore -- Less Is More" by Chris Probst.
There is also a FAQ#8109, on the same topic.
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)