rpravisani
rpravisani

Reputation: 141

mysql importing 45MB sql takes forever

I'm trying to import a mysql backup of around 45Mb through phpmyadmin, but it takes forever. I've set $cfg['ExecTimeLimit'] = 0 in the config.default.php of my local phpmyadmin installation, but afer two hours it's still running! I can't realy understand why such relative small backup must take so much time. Is there a way to optimise the import process (in php.ini of my.conf) or the backup file it self?

Upvotes: 0

Views: 251

Answers (3)

rpravisani
rpravisani

Reputation: 141

Ok, so the problem was apparently the phpmyadmin configuration, since command line import took less than 30 seconds and so did the phpmyadmin shipped with the Xampp stack I installed this afternoon. Unfortunately I cannot really say what configuration caused this enormous slowdown. Thanks for the help anyway.

Cheers Roberto

Upvotes: 0

G San
G San

Reputation: 81

try some number insted of 0 in ExecTimeLimit.

Upvotes: 0

FluxCoder
FluxCoder

Reputation: 1276

My bet is that Fedora 16 is honoring the transaction/sync semantics and Windows is not. If you do the math, 600,000 updates in two hours is 5,000 per minute. That's the same order of magnitude as a disk's rotation rate.

You can try adding SET autocommit=0; to the beginning of your import file and COMMIT; to the end. See this page for more information.

These are the only few options that I could suggest to making it import better. Also, Make sure you should increase the value of max_allowed_packet=32M or more in my.cnf file before generating the .sql file.

Upvotes: 1

Related Questions