pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC Rowsets running out of memory when dealing with large tables
2+ messages / 2 participants
[nested] [flat]
* JDBC Rowsets running out of memory when dealing with large tables
@ 2004-07-26 09:35 Amit Ray <ray_amit@vsnl.net>
2004-07-26 17:15 ` Re: JDBC Rowsets running out of memory when dealing with Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 2+ messages in thread
From: ray_amit@vsnl.net @ 2004-07-26 09:35 UTC (permalink / raw)
To: pgsql-jdbc
Hello,
The following code doesn't work for SELECT query on very large tables
:
...
import javax.sql.RowSet;
import oracle.jdbc.rowset.OracleJDBCRowSet;
....
RowSet rowset = new OracleJDBCRowSet();
rowset.setUsername(username);
rowset.setPassword(password);
rowset.setUrl(url);
rowset.setConcurrency(ResultSet.CONCUR_UPDATABLE);
rowset.setCommand();
rowset.execute();
while ( rowset.next() )
{
// These variables have been declared earlier
callType = rowset.getString("CALL_TYPE");
otherNumber= rowset.getString("OTHER_NUMBER");
timestamp = rowset.getTimestamp("CHARGING_TIMESTAMP");
volume = rowset.getInt("VOLUME");
rowset.updateFloat("CHARGE", volume * 0.50);
rowset.updateRow();
}
// Closing the DB connection.
rowset.close();
...
The jars used : ojdbc14.jar, ocr12.zip, ocr12.jar comes along with
Oracle 9i.
It runs out of memeory when I try to execute it on a large table. Is
it because the rowset is trying to cache the entire resultset in
memory? From practical requirements point a view neither can I
guarantee that the data would be lesser than permitted by the m/c's
main memory on which it will be implemented nor the actual table can
be split up into chunks.
Is there any other way out ? Please reply asap.
Amit Ray.
http://www.go4expert.com/forums/
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: JDBC Rowsets running out of memory when dealing with
2004-07-26 09:35 JDBC Rowsets running out of memory when dealing with large tables Amit Ray <ray_amit@vsnl.net>
@ 2004-07-26 17:15 ` Kris Jurka <books@ejurka.com>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2004-07-26 17:15 UTC (permalink / raw)
To: Amit Ray <ray_amit@vsnl.net>; +Cc: pgsql-jdbc
On Mon, 26 Jul 2004, Amit Ray wrote:
> The jars used : ojdbc14.jar, ocr12.zip, ocr12.jar comes along with
> Oracle 9i.
This list is for questions about postgresql and it's jdbc driver, not
Oracle.
Kris Jurka
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-07-26 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-26 09:35 JDBC Rowsets running out of memory when dealing with large tables Amit Ray <ray_amit@vsnl.net>
2004-07-26 17:15 ` Re: JDBC Rowsets running out of memory when dealing with Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox