Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL optimization
Message
From
21/08/2001 06:48:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL optimization
Miscellaneous
Thread ID:
00546622
Message ID:
00546622
Views:
41
Hi,
I want to ask something about rushmore in VFP6.0
I tried 2 methods to join 2 tables
1. select A.*,B.* from A inner join B on A.key1=B.key1 and A.key2=B.key2 where A.key1=constantA
2. select A.*,B.* from A inner join B on A.key2=B.key2 where A.key1=ConstantA and B.key1=ConstantA
and found the time taken was different! SQL 2 was much faster than SQL 1.
All fields included in the condition was indexed. I used sys(3054) to check, and found that SQL 2 used temp index and SQL1 used key2 as index. Could anybody tell me why?
TIA.
Next
Reply
Map
View

Click here to load this message in the networking platform