Suppose I have table t1(c1, c2, c3, c4, c5,..)
I need to run queries where the columns (e.g. c1, c2, c3 here) used in where condition of select query as in below. The queries are making application slow.
select * from t1 where c1=somevalue1 and c2=somevalue2
select * from t1 where c3=somevalue1
select * from t1 where c1=somevalue1 and c2=somevalue2 and c3=somevalue
To improve performance of the queries, I want to create index on the columns which are used on where clause. what should be a better approach to create index on columns(c1, c2, c3)? multiple indexes like index1(c1), index2(c2), index3(c3), index4(c1, c2, c3) or Just one index like index1(c1, c2, c3)
Can anybody please advise on this??