Re: outOfMemoryError

Поиск
Список
Период
Сортировка
Искать
От
Dave Cramer
Тема
Re: outOfMemoryError
Дата
Msg-id
DE16CA8B-FB61-429B-92B3-D859DA009E3D@fastcrypt.com
Ответ на
Re: outOfMemoryError (Vidas Makauskas)
Список
Дерево обсуждения
Re: outOfMemoryError "Vidas Makauskas" <vms@centras.lt>
Re: outOfMemoryError Dave Cramer <pg@fastcrypt.com>
Re: outOfMemoryError Luis Vilar Flores <lflores@evolute.pt>
Re: outOfMemoryError Kris Jurka <books@ejurka.com>
Re: outOfMemoryError Dave Cramer <pg@fastcrypt.com>
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 = 
> 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 = 
>  rsmd = postgres.getMetaData();
>  rows = 0;
> }
>
>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

В списке pgsql-jdbc по дате отправления
От: Vidas Makauskas
Дата:
Сообщение: Re: outOfMemoryError
От: Kris Jurka
Дата:
FAQ