I have a few queries that I want to speed up, but the columns they filter on are all different, but related, and I'm having trouble figuring out the best way to make indexes for them.
So the first query is something like this
1: select * from TABLE where A=? AND B=? and C=?
Then, the next three queries are all on the same table, but they each use one of the possible combinations of 2 elements from A, B and C.
2: select * from TABLE where A=? AND B=? 3: select * from TABLE where A=? and C=? 4: select * from TABLE where B=? and C=?
So I figure if I make an index on (A,B,C) that will speed up query 1 and 2, but I don't think it will do anything for query 3 or 4. So then would I need two more indexes on (A, C) and (B, C), or is there a more efficient way to do this?
I'm using Oracle 12c btw.