Hi ,
I am having a table having 249 columns and want to perform a group by on 20 columns .Its a history table which is getting inserted daily .
So there is no index on this table .My group by query is like below
select
col1,col2,col2,col3....col20,count(0)
from t
group by col1,col2,col2,col3....col20 ;
My question is that on which columns should i create index so that it will take less time .Currently the table ( t ) is having 112 crores of data .
Do i need to create index on all 20 cols .