Re: Adapter update.

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Adapter update.
Дата
Msg-id 46CDC864.8050102@archonet.com
обсуждение исходный текст
Ответ на Re: Adapter update.  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
Joshua D. Drake wrote:
>>
>> I have added transaction to my code and it took about 2 and half hours to
>> process around 48,000 records. Again all this time is taken by update method
>> on the adapter.
>>
>> I don't know Perl to setup the database link to SQL Server 2005 and also I
>> don't have permission to write the data to files. Are there any other
>> options like a different driver I can use or through stored procedures. I
>> have to compare each column in each row before doing the update.
>
> This is probably where your time is spent, not the actual commit of the
> data. 48k records is nothing.

Ditto what Joshua says. Loading that many records should take minutes
not hours.

Try this last bit of my first reply.

>> Load the data into an import table (TEMPORARY table probably) and then just
>> use three queries to handle deletion, update and insertion.
>> Comparing one row at a time is adding a lot of overhead.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Adapter update.
Следующее
От: Erik Jones
Дата:
Сообщение: Re: Apache + PHP + Postgres Interaction