pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vidas Makauskas <vms@centras.lt>
To: pgsql-jdbc@postgresql.org
Subject: Re: outOfMemoryError
Date: Tue, 29 Aug 2006 16:22:07 +0300
Message-ID: <ed1evf$1lqb$1@news.hub.org> (raw)
References: <ed0ra2$5ct$1@news.hub.org>
	<6E13F8E6-8D37-4D2D-833D-AFFD87BF22B8@fastcrypt.com>

> 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;
}





view thread (10+ messages)  latest in thread

Message-ID: <ed1evf$1lqb$1@news.hub.org>
Permalink:  ../ed1evf$1lqb$1@news.hub.org/
Also on:    postgresql.org/message-id/ed1evf$1lqb$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: vms@centras.lt
  Subject: Re: outOfMemoryError
  In-Reply-To: <ed1evf$1lqb$1@news.hub.org>
  References: <ed0ra2$5ct$1@news.hub.org> <6E13F8E6-8D37-4D2D-833D-AFFD87BF22B8@fastcrypt.com> <ed1evf$1lqb$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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