From: | "Vidas Makauskas" <vms(at)centras(dot)lt> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: outOfMemoryError |
Date: | 2006-08-29 13:22:07 |
Message-ID: | ed1evf$1lqb$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
> Can you post your basic loop ?
>
ResultSet oracle = <"SELECT * FROM oracle">
ResultSet postgres = <SELECT oid,* FROM postgres WHERE oid=0>
ResultSetMetaData rsmd = postgres.getMetaData();
int vnt = rsmd.getColumnCount();
int rows = 0;
while (oracle.next()) {
<***** SEE BELLOW ******>
postgres.moveToInsertRow();
for (int i=1; i <= vnt; i++)
if ( ! "oid".equals(rsmd.getColumnName(i)))
if (oracle.getObject(rsmd.getColumnName(i)) != null)
postgres.updateObject(i, oracle.getObject(rsmd.getColumnName(i)));
postgres.insertRow();
}
> From what I can see your expectations are a little unrealistic how do you
> expect to process 10G rows at a time?
rows += 1;
if ( rows > 100000 ) {
postgres = <SELECT oid,* FROM postgres WHERE oid=0>
rsmd = postgres.getMetaData();
rows = 0;
}
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2006-08-29 16:19:51 | Re: I can't retrieve a scrollable ResultSet fr |
Previous Message | Dave Cramer | 2006-08-29 12:05:26 | Re: outOfMemoryError |