Slowness restoring MySQL DB from a dump

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?


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.

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

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

–Matttail - personal website

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.