New post

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;

Leave a Reply

Your email address will not be published. Required fields are marked *