2015-08-25
MySQL - How to optimize for large SQL files upload/import
(1) Change the value of the mysql configuration file variable "" from 1 to 0.
(2) If using InnoDB, read the configuration file and do use up to 80% of the machine's available RAM.
(3) Start your .sql script with "SET autocommit = 0;" and end it with a manual "commit;".
(4) If possible, make sure your script inserts rows in PK-order.
(5) Avoid using IDE's... mysql command-line is usually faster and more reliable. Loading using MySQL Workbench or Sequel Pro (mac), often produces random disconnections, or interruptions due to strange errors such as the database detecting a different encoding than the one specified or automatically detected.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment