Slowness restoring MySQL DB from a dump

Slowness restoring MySQL DB from a dump

Posted by: velosa
Posted on: 2007-06-24 23:05:00

I was trying to update around 4000 records in a ruby migration script. It had taken a few minutes on my local laptop (a G4), but after it had run for an hour on DreamHost and only updated 200 of the records, I decided to give up. I had made a dump before I did the update, so now I'm trying to restore that dump and it has been running for over half an hour. The dump is about 3.4 meg and took about 10 minutes to restore on my laptop. I also loaded the same dump on another hosting service and it took 25 seconds.

Any ideas about what's taking it so long? Any suggestions on how to speed things up?

Thanks,
-Nathan


Re: Slowness restoring MySQL DB from a dump

Posted by: velosa
Posted on: 2007-06-24 23:26:00

The restore finally completed after nearly an hour. I'd still like to do the big update sometime soon, but I'd like to understand why it's taking so long and how to do it faster when the time comes.


Re: Slowness restoring MySQL DB from a dump

Posted by: matttail
Posted on: 2007-06-25 08:45:00

how are you preforming the update? through phpmyadmin, some wonky ruby thing, or ssh?

(sorry about the ruby jab, I just had to)



--Matttail
art.googlies.net - personal website

Re: Slowness restoring MySQL DB from a dump

Posted by: velosa
Posted on: 2007-06-26 20:32:00

I'm doing the individual updates through a wonky (but really cool :-)) ruby migration. However, the database restore which is my real question was done just by redirecting the dump output directly into a mysql connection. Consequently I think it is dreamhost/mysql wonk rather than ruby wonk that is gumming up the works.


Tags: migration scriptlaptopmysql dbdreamhosthalf an hourhosting servicerubyi decidedmegfew minutes