Load big data to MySQL by chunks
pt-fifo-split --lines 1000000 your-huge-file &
while [ -e /tmp/pt-fifo-split ]; do mysql --login-path=your-login --local-infile=1 -e "LOAD DATA LOCAL INFILE '/tmp/pt-fifo-split' INTO TABLE your-table" your-database; done
pt-fifo-split is a part of Percona Toolkit
Comments
Post a Comment