Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a table named app with millions of lines.

/var/lib/mysql/our_data/app.MYD  1468.527344

When running a query such as:

select * from (select * from app) as temp;

We get the following:

ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_3bb_0.MYI'; try to repair it

This is because the remaining space on the machine is filled up = 0 MB free.

Executing create table app2 as select * from app; however works - it increases disk usage but does not reach 100%.

Why does creating the same table with the same data again use less memory than the temporary table above?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.