Is it possible to stream the output of a query in mysql to a file?
Of course I can do mysql -e "select id from huge_table" > my_file.txt
But that seems to wait to end the query before outputting the content to the file, which would be of course bad at memory level.
Can the query be streamed as the results are fetch.
In postgres there is the \copy
command which does precisely this.