-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
John McCaskey wrote: | The problem is not the memory on the database server, but on the client | running the JDBC connection. Seems that when you retrieve the result it | is trying to store everything in memory at once. | | Here is some info from the mysql docs that looks like it pertains, see | http://dev.mysql.com/doc/connector/j/en/index.html for more. [snip]
Amit,
Apart from John's fine advice from our docs, I usually ask people that run into this problem if they _really_ need to iterate over 1 million/billion rows...In _most_ cases, they don't, they just don't know about the power of set-based operations in SQL.
Often a simple refactoring of the algorithm you're using to process rows can be orders-of-magnitude faster than fetching each row to the client and dealing with it there.
MySQL-5.0 will have 'cursor-based' result sets, and the code is already worked out to use them in Connector/J, which will be released when the code to support this is finalized in the server (it's still in a state of flux).
Regards,
-Mark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBdsActvXNTca6JD8RArW2AJ9qhIn7rH3EcxsVLiXYBNI7MfKYqwCfSQKd pD98YQUFAILxI4fpcqHBUaE= =7GOG -----END PGP SIGNATURE-----
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]