Hilmar,
Wait a minute ... WHERE is supposed to be faster than JOIN? Are you sure?Let me explain better. Take a look:
Select Sum(B.Field3 - B.Field4);
From B Left Outer Join A On B.Field1 = A.Field1;
Where B.Field2 = "SOMETHING" .and.;
B.Field3 > B.Field4 .and.;
A.Field2 = "YES" .and.;
Into Cursor MyTest
Select Sum(B.Field3 - B.Field4);
From B Where B.Field1 = "SOMETHING" Into Cursor MyTest
In Example 1, the problem appears (with indexes is more slowly than without).
In Example 2, the rushmore works fine.
I mean: If I have indexes in A.Field1 and B.Field1, the JOIN should be more faster than the table that do not have index. But rushmore works (or works fine) just in example 2.
[]s
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte