java.lang.OutOfMemoryError - Mailing list pgsql-jdbc

From Paul Cullum
Subject java.lang.OutOfMemoryError
Date
Msg-id 3E3E8394.2050908@n-able.com
Whole thread Raw
Responses Re: java.lang.OutOfMemoryError  (Matt Mello <alien@spaceship.com>)
Re: java.lang.OutOfMemoryError  (Barry Lind <blind@xythos.com>)
List pgsql-jdbc
I'm querying a table that has nearly 3 million records in it and when I
call executeQuery() I get an a java.lang.OutOfMemoryError message.  My
immediate thought was that it was strange that a safe fetch size wasn't
used automatically so I then I decided to explicitly the fetch size by
calling the Connection classes setFetchSize() method.  Apparently this
is not implemented in the pg73jdbc3.jar driver.   I am surprised that
the default fetch size is so great as to cause an OutOfMemoryError. What
is the proper method for using JDBC to query result sets which are
potentially large?

Thanks,
Paul


pgsql-jdbc by date:

Previous
From: J M Okomba
Date:
Subject: Re: st.executeQuery("SELECT NEXTVAL('seq_suporte') AS valo
Next
From: Barry Lind
Date:
Subject: Re: DatabaseMetaData oddities