That should be a fairly standard question but I cant find the answer at he moment. I am writing a short script that exports tables to csv files. Naturally tables I have may be quite large (up to 1 G). If I just use
Java Code:
SELECT * FROM tableName
java tries to read the table in one piece and naturally runs out of memory. I guess I could do smthing like
Java Code:
SELECT * FROM tableName LIMIT rowStart, rowEnd
in a loop but that would be 1. specific to mysql only and 2. I was wondering what is a better/standard way to get around the problem.