title: Slow running MySql restore - 10 times slower than backup speed and still going
body: <p>I'm moving a large (~80GB) database from its testbed into what will be its production environment. We're working on Windows servers. This is the first time we've worked with MySQL and we're still learning the expected behaviours.</p>
  
  <p>We backed up the data with </p>
  
  <pre><code>mysqldump -u root -p --opt [database name] &gt; [database name].sql
  </code></pre>
  
  <p>Which took about 3 hours and created a file 45GB in size. It copied over to its new home overnight and, next morning, I used MySQL Workbench to launch a restore. According to its log, it ran</p>
  
  <blockquote>
    <p>mysql.exe --defaults-file="[a path]\tmpc8tz9l.cnf"  --protocol=tcp --host=127.0.0.1 --user=[me] --port=3306 --default-character-set=utf8 --comments --database=[database name]  &lt; "H:\[database name].sql"</p>
  </blockquote>
  
  <p>And it's working - if I connect to the instance I can see the database and some its tables.</p>
  
  <p>The trouble is, it seems to be taking forever. I presumed it would restore in the same 3-4 time frame it took to back up, maybe faster because it's restoring onto a more powerful server with SSD drives.</p>
  
  <p>But it's now about 36 hours since the restore started and the DB is apparently 30GB in size. And it appears to be getting slower as it goes on.</p>
  
  <p>I don't want to interrupt it now that it's started working so I guess I just have to wait. But for future reference: is this treacle-slow restore speed normal? Is there anything we can do it improve matters next time we need to restore a big DB?</p>