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