Hi Johan,

I need to extract some data to a textfile from a big database.


If I try to do like this:
mysql < queryfile.sql > outfile.txt

"outfile.txt" it looks something like:
"OrderID", "Quant", "OrdrDate", "code1", "code2"...
10021, 12, 20060412, 23, 95...
10022, 5, 20060412, , 75...

But, I never get a complete file. I get a out of memory error after a hour or 2!!

This is because the mysql client program is trying to read the entire result into its own memory. Try adding the '-q' option to mysql:

  mysql -q < queryfile.sql > outfile.txt

Regards,

Jeremy

--
Jeremy Cole
MySQL Geek, Yahoo! Inc.
Desk: 408 349 5104

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to