Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore: One more time...
Message
 
To
11/04/2002 07:27:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00642985
Message ID:
00643646
Views:
7
Hilmar,

Wait a minute ... WHERE is supposed to be faster than JOIN? Are you sure?

Let me explain better. Take a look:
* Example 1)
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

* Example 2)
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
Previous
Reply
Map
View

Click here to load this message in the networking platform