From: | "Merlin Moncure" <mmoncure(at)gmail(dot)com> |
---|---|
To: | MG <pgsql-general(at)carladata(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Fw: Performance UPDATE/INSERT |
Date: | 2006-04-11 13:22:41 |
Message-ID: | b42b73150604110622u4c2eacd1o619df0d3c8fe288d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 4/11/06, MG <pgsql-general(at)carladata(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | John D. Burger | 2006-04-11 14:24:25 | Re: Search by distance |
Previous Message | Dave Page | 2006-04-11 13:16:37 | Re: Debian package for freeradius_postgresql module |