When to use single-column index or a composite index?

Short Answer
Views 410

Answer:

To create a single-column index or a composite index, take into consideration the column(s) that you may use very frequently in a query's WHERE clause as filter conditions.

Should there be only one column used, a single-column index should be the choice. Should there be two or more columns that are frequently used in the WHERE clause as filters, the composite index would be the best choice.

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of SQL, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.