How to tune count(*) with group by for a huge table
531625Dec 12 2006 — edited Dec 13 2006Hi All!
I have a table containing more than 40 million records. I have many reports showing count(*) using various group by clauses. All these reports take 30-45 sec. to come up. A simple select on this table does'nt take more than 5 sec. Therefore I believe the problem is with count(*). I have also indexed the columns in the table.
Can anybody suggest tips to fine tune this count(*) with group by clauses so that the query runs faster.
Regards,
Deepika.