3 messages in org.postgresql.pgsql-jdbcRe: Prepared Statement Memory Size
FromSent OnAttachments
jennie browneJul 18, 2006 9:42 am 
Kris JurkaJul 18, 2006 10:06 am 
Dave CramerJul 18, 2006 10:24 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Prepared Statement Memory SizeActions...
From:Kris Jurka (boo@ejurka.com)
Date:Jul 18, 2006 10:06:01 am
List:org.postgresql.pgsql-jdbc

On Tue, 18 Jul 2006, jennie browne wrote:

We have a prepared statement example below:

With no dynamic parameters populated during runtime it will return roughly 1million rows. During execution of the query the preparedStatment grows in size up to 80MB and beyond.

We have the fetchSize set to 1000 And autocommit set to false.

And the following params set

stmt =
conn.prepareStatement(query,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

setFetchSize will only work with ResultSet.TYPE_FORWARD_ONLY. It has no effect on scrollable ResultSets.