I am importing a large csv file into mysql(30 million rows) and I had another terminal open to show the process list. I used to be able to see the row count on the process list but now, whenever I enter the command “show process list” it hangs. I had 20 million records imported. Do I have to start all over again?
iostat:
[user@gggggg ~]$ iostat
Linux 2.6.18-308.4.1.el5
avg-cpu: %user %nice %system %iowait %steal %idle
5.02 0.00 0.16 0.87 0.00 93.95
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 2.15 5.31 55.58 8644514 90425752
sda1 0.00 0.00 0.00 2138 5592
sda2 2.15 5.31 55.57 8640178 90419984
sda3 0.00 0.00 0.00 1582 176
top - 14:18:55 up 18 days, 20:00, 2 users, load average: 2.02, 2.09, 2.06
Tasks: 106 total, 3 running, 103 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.0%sy, 0.0%ni, 49.9%id, 49.8%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 8174532k total, 7656780k used, 517752k free, 105904k buffers
Swap: 4257216k total, 88k used, 4257128k free, 6958020k cached
First, check the filesize from the OS
If the table is called mydb.mytable and it is MyISAM, do this:
If the filesize keeps growing, you are fine
Don’t forget to check for diskspace
If you ran out of diskspace while loading a MyISAM table, mysqld is just sitting there. Why? According to MySQL 5.0 Certification Study Guide Page 408,409 Section 29.2 bulletpoint 11 says:
Therefore, if the data partition is out of diskspace, you must free up some space so mysqld can conitnue the
LOAD DATA INFILE.If everything seems frozen, you may have to kill mysqld as follows:
Then, check your diskspace