I am working on an Oracle 12c
database.
I have a table being queried a lot. One query uses columns A and B in where clause, another query uses A,B,C,D & E columns in the where clause. I want to speed up queries.
I have added 2 non-unique indexes, one on A & B and one on A & B & C & D & E, so my second index actually includes the first index columns. Is this right? Technically wrong? Or it depends?
In such cases, in which a table is queried on different columns, what is the best practice for indexes? What are the impacts of indexes?