Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing and Joins
Message
 
 
À
07/08/2001 08:44:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00540551
Message ID:
00540616
Vues:
13
>>>
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.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform