Re: Fw: Performance UPDATE/INSERT - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Fw: Performance UPDATE/INSERT
Date
Msg-id b42b73150604110622u4c2eacd1o619df0d3c8fe288d@mail.gmail.com
Whole thread Raw
In response to Fw: Performance UPDATE/INSERT  ("MG" <pgsql-general@carladata.de>)
List pgsql-general
On 4/11/06, MG <pgsql-general@carladata.de> wrote:
> In on extreme case the application  makes 100 000  INSERTs, in the other
> extreme case 100 000 UPDATES. Normally the UPDATES are more that INSERTs.
> Here I notice that the first case (100 000  INSERTs)  takes about 30 minues,
> but the 100 000 UPDATES about 1 hour.
>
>  I can't  prepare the file to  use an COPY, because the application
>  manipulates the records from the file in a complex way.
>  I've also tried with vaccum to get more performance, but hat no success.

You should probably look at rewriting your procedure in a pl/pgsql
function.  Have your app bulk load into a work table and then loop it
doing your sql processing on the fly. It will be fast and is a a good
exercise.

Merlin

pgsql-general by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Debian package for freeradius_postgresql module
Next
From: "John D. Burger"
Date:
Subject: Re: Search by distance