java.lang.OutOfMemoryError

From: Paul Cullum <pcullum(at)N-able(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: java.lang.OutOfMemoryError
Date: 2003-02-03 14:58:28
Message-ID: 3E3E8394.2050908@n-able.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2003-02-03 17:08:01 Re: DatabaseMetaData oddities
Previous Message J M Okomba 2003-02-03 14:52:04 Re: st.executeQuery("SELECT NEXTVAL('seq_suporte') AS valo