>Let me pose this related item: It seems that one way to have an inner join execute as fast as possible is to minimize the size of the input sets from which the join is derived. For example, using my example below, if there are a lot of matches ON b.somefield=a.somefield, but overall few matches WHERE a.field1="X", it seems to me that it would be most efficient to have the WHERE execute first rather than last, thus minimizing the input overhead on the join operation. Assuming that some things are known about the data (such as in this example where I know that the WHERE logic results in only a few matches), is it more efficient to first dredge a subset from set "a" into a cursor, and then join that cursor with set "b"? This approach would impose the WHERE clause first.
I used that approach successfully in VFP6, but it seems the VFP SQL parser got much smarter meanwhile.
You may just benchmark it and see what's faster.