I begin by launching the MySQL command line tool:
mysql --user=myusername --password=mypassword --silent --force -b
The last -b
option is used to disable beep on error.
Then I choose a database:
use Mydatabasename;
Then I execute SQL form a file like this:
source c:\x\y\z\myfile.sql
That's when things go slowly. I've executed part of the file before so the console is filled with duplicate row errors which slow execution badly. I get 5-10 statements executed per second. Without duplicate rows the code executes tens of thousands of statements (30k+) every 5 seconds.
I need to do this since the file is large and I can't execute it in one go.