sql - Approach to index on Multiple Join columns on same Table? -
Many tables have been included in each other and for me to be in a condition for a vertical table There are many columns for.
For example
select an a.av, b.qc TableA Add an INNER TableB b ON (a.id = b.id and a.status = '20' and a.flag = 'wrong' and a.num (1,2,4)) how approach should be.
Include TableA (id, status, flag, number) on non-cloned index N_IX_Test (av); 2. Include the informal index N_IX_Test1 in Table (qc); I could have thought that these are two approaches, all the time when I see a number of columns when I am in position for the same table, I make it as a whole index and Is it OK to add columns to include in the selection list?
Different algorithms require different sequences. Your indexing approach is only good for joining the nested loop, but I think it is a better option to be involved in a hash in that case. However, there is a move that makes an index useful for joining the hash along with nested loop: predicts non-job in the index already:
Nonclassed index N_IX_Test ON TableA (Status, Flag, ID, Number) contains (av); num is still the last one because it does not compare to equality. This is just a wild guess, accurate advice is possible only if you provide more information such as package indexes (if any) and execution plans too.
Reference:
-
Comments
Post a Comment