gotchasqlMajor
Why does importing a 12 GB .sql file take more than 36 hours?
Viewed 0 times
whyfilesqltakethanmorehoursdoesimporting
Problem
I've been waiting now for 36 hours for a 12 GB .sql file to be imported with a simple
Considering the triggers and stored procedures are at the end of the .sql, I only think MySQL should be adding data and key indexes.
The site.sql was generated using this command from another server:
What's taking so long?
type site.sql | mysql command. I can see the ibdata1 is growing still, currently nearly 40 GB.Considering the triggers and stored procedures are at the end of the .sql, I only think MySQL should be adding data and key indexes.
The site.sql was generated using this command from another server:
mysqldump -R -e --databases site --add-drop-database --add-create-database --add-drop-table -C --single-transaction --triggersWhat's taking so long?
Solution
Try this:
Identify the process id then
Leave it 10 seconds or a minute then
$ ps -ef|grep [m]ysqlIdentify the process id then
$ strace -cp Leave it 10 seconds or a minute then
^C. That will tell you where the process is spending its time, e.g. it could just be waiting for the disk if you seen read and write dominate.Code Snippets
$ ps -ef|grep [m]ysql$ strace -cp <pid>Context
StackExchange Database Administrators Q#1326, answer score: 24
Revisions (0)
No revisions yet.