I have the table smses_in with id and text columns (about 250 000 records), when I do the query
SELECT count(id) FROM `smses_in` group by text
I get next error:
1022 - Can't write; duplicate key in table '/tmp/#sql_3ed_0'.
I have the table smses_in with id and text columns (about 250 000 records), when I do the query
SELECT count(id) FROM `smses_in` group by text
I get next error:
1022 - Can't write; duplicate key in table '/tmp/#sql_3ed_0'.
you cannot get that error for a select statement i did a similar query
select count(*) from supportContacts group by id
you can see at http://sqlfiddle.com/#!2/a2581/24273
possibly there is some other query in your code which is being run at thee same time...