Skip to content

Instantly share code, notes, and snippets.

@soey
Last active December 21, 2015 13:18
Show Gist options
  • Save soey/6311279 to your computer and use it in GitHub Desktop.
Save soey/6311279 to your computer and use it in GitHub Desktop.
alternatives to insert into select causing read locks on innodb
SELECT * FROM tbl1 INFO OUTFILE '/tmp/tbl1.txt';
LOAD DATA INFILE '/tmp/tbl1.txt' INTO TABLE tbl2;
//see http://www.mysqlperformanceblog.com/2006/07/12/insert-into-select-performance-with-innodb-tables/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment