By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
I have a question regarding composite indexes. I have just taken over a database and I notice that there are redundant composite indexes for various tables. By redundant I mean, for example, that TABLE T1 has INDEX_1 on columns (col1, col2, col3), and there is a second index INDEX_2 on columns (col1, col2, col3, col4). I would like to know why two indexes of this kind are required? In such a case isn't it possible to get rid of INDEX_1, since the columns indexed in INDEX_1 are part of INDEX_2 as well and are in fact in the same order, so automatically INDEX_2 can be used for all queries on col1, col2, col3 and col4. Please let me know if I am missing anything.
You are correct. INDEX_1 is redundant and should be dropped.