Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The speed of execution depends a lot on how the SQL file is built - regardless of the SQL client (heidi, sqlworkbench, yog, ...).
- For example when using mass inserts the execution can take a fraction of the time (insert into every line takes minutes when single mass insert takes less than 1 second for 10000 rows of data).
- I was first questioning that heidi would be slow, but to get out of my bias of using it for 9 years I decided to run a little test:
- [CODE]client: single inserts of 100000 rows, 750 MB DB creation, single inserts of 10000 rows, mass insert of 10000 rows
- mysql cli: 13 seconds, 1 minute 53 seconds, 2 seconds, < 1 second
- mysql workbench: 14 seconds, 1 minute 52 seconds, 2 seconds, < 1 second
- navicat for mysql: 19 seconds, 3 minutes 45 seconds, 2 seconds, < 1 second
- SQLyog community edition: 1 minute 30 seconds, 2 minutes 27 seconds, 5 seconds, < 1 second
- heidisql: 7 minutes, 4 minutes 30 seconds, 3 minutes, < 1 second[/CODE]
- Conclusions and notes:
- - cli and workbench are equally fast and fastest of them all (cli might be billion times easier to use though)
- - navicat and sqlyog are a tad slower and seem to be better than the other in some situations
- - [B]heidisql is slow as hell[/B]
- - I only ran 1-3 test runs and the results were multiple seconds apart, so it is possible that between different runs the times could change noticeably. For example in some later run navicat took 22 seconds for single inserts of 100000 rows.
- - heidi, cli and workbench are free
- - yog is free but complains that you should pay up
- - navicat costs
- - checking "run multiple queries in each execution" might create long queries that cause mysql server to go away, so maybe dont use that setting (is on by default).
- So based on this in your situation [B]I would recommend[/B] trying out just the [B]mysql command line[/B] as CrazyDane suggested or [B]workbench [/B]as shotsofdeath98 suggested.
- Since you say it takes hours I would assume that some of the SQL is not optimized. If you cannot get it to run it might be worth it to try edit and optimize the SQL in some places manually before trying to run it.
- After importing the SQL successfully I would recommend exporting it using any tool (mysqldump, heidisql, workbench ...) as those should in my experience create an export which uses mass inserts. With the new export importing would likely be a lot faster later on (as you can see that for me 750MB took only some minutes and not hours).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement