Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>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.
>
>In general, optimization is affected when you are selecting a subset of records using a join and/or a filter. The criteria used to determine the qualifying records is what determines optimization. The fields used for the filter or join criteria are the fields that need indexes if they will have an effect on the actual records selected. In your example, the LEFT JOIN basically eliminates any optimization on Table1 because you are retrieving ALL records from Table1. Technically what this is doing is no more that what a SET RELATION does.
So at the end of the day, it isn't going to make any difference.
Kev
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement