Re: Adapter update. - Mailing list pgsql-general

From Richard Huxton
Subject Re: Adapter update.
Date
Msg-id 46CDC864.8050102@archonet.com
Whole thread Raw
In response to Re: Adapter update.  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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 by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Adapter update.
Next
From: Erik Jones
Date:
Subject: Re: Apache + PHP + Postgres Interaction