I have a table with more than 10 million rows and 10 fields(columns). There is an index on field_1 and I am running the following query.
create table t2 select field_1, sum(ifnull(field_2,0)) as field_2, sum(ifnull(field_3,0)) as field_3, sum(ifnull(field_4,0)) as field_4 from t1 group by field1;
The data type of all the columns is varchar(200).
This query is not able to produce the result even after running for more than 1 day. Any suggestions on getting the results quickly will be helpful.