mysql takes up a lot of memory when writing results to a file -


i have query so:

mysql --port=3306 --host=remote_host -e 'select * pretty_big_table' > data.out 

the problem is, table pretty big , takes lot of memory. can't select ... outfile because i'm running on remote host. there way dump data out locally without taking memory?

use mysql --quick.

http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html

  • --quick, -q

    do not cache each query result, print each row received. may slow down server if output suspended. option, mysql not use history file.


Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -