mysql file output is efficient — but needs the FILE permission, which mysql turns off by default for most users:
mysql> select foo into outfile '/tmp/bar.txt' from sometable group by foo;
Data, words, code
mysql file output is efficient — but needs the FILE permission, which mysql turns off by default for most users:
mysql> select foo into outfile '/tmp/bar.txt' from sometable group by foo;