General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to optimize this simple 'inner join'?
Hi everyone.
I have two tables this way:
Master : Primary key = Field1 + Field2
Detail : Regular index = Field1 + Field2 (Just like Master-Primary key)
I am trying to see how VFP get optimized queries and found this:
Select * from detail where field1+field2 = master.field1 + master.field2.
It is optimized (sys(3054,1)) and works very fast, but of course, it only takes one record from master table.
Now, I want all records using 'inner join' and similar expressions:
Select * from master inner join detail on ;
master.field1 + master.field2 = detail.field1 + detail.field2
Optimization: None.
Why this statement is not optimized?
Thanks.
Juan Carlos
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only