Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing and Joins
Message
From
07/08/2001 09:26:22
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00540551
Message ID:
00540627
Views:
16
>>>>
SELECT * FROM Table1;
>>>>  LEFT OUTER JOIN Table2;
>>>>    ON Table1.Field1 = Table2.Field1;
>>>> etc. etc.
>>>>
>>>>Right, Table2.Field1 is indexed, but Table1.Field1 is not, will it make a difference in performance if Table1.Field1 was indexed?
>>>
>>>Yes. See Sys(3054) in VFP help to see how to determine the level of optimization.
>>
>>Mark
>>
>>SYS(3054) reports the same whether Field1 is indexed or not!
>
>Sorry, I made assumption that your etc. etc. included a filter on Table1.Field1. Since you are SELECTing * from Table1, and doing a LEFT JOIN there is nothing to optimize on Table1 because you are indeed selecting ALL records from Table1. Again, now I am making an assumption that there is no filtering of any Table1 fields in the WHERE clause.

There is filtering in the SELECT in question, but I was trying to establish if the JOIN itself would be affected by the additional index.

Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform