I have a query running on a large table that worked when I did limit 100. When I remove the limit I get:
[Err] 126 - Incorrect key file for table '/tmp/#sql_5e2d_6.MYI'; try to repair it
I checked with server admin basically the /tmp
file fills up quickly.
Is there a way to set up the query to flush the table as it goes along? Or run say 100 records, stop, re-run? The query is pretty simple:
select distinct a,
min(b) N_b
from K
group by a;
At the end of the day what I am trying to do is delete from a large table duplicate records, keeping the record with the lowest value in b
. This was the initial select
statement.