This design is limited by memory.
You would be far better off inserting directly instead of using a
ResultSet
Dave
On 29-Aug-06, at 9:22 AM, Vidas Makauskas wrote:
>> 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;
> }
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>