Re: degrading inser performance - Mailing list pgsql-performance

From Matheus de Oliveira
Subject Re: degrading inser performance
Date
Msg-id CAJghg4KWkUhkzNeuqkihDCxVBgseJDeCoYni735RwiUOad4-5g@mail.gmail.com
Whole thread Raw
In response to Re: degrading inser performance  (Eildert Groeneveld <eildert.groeneveld@fli.bund.de>)
Responses Re: degrading inser performance  (Eildert Groeneveld <eildert.groeneveld@fli.bund.de>)
List pgsql-performance

On Thu, Sep 17, 2015 at 9:19 AM, Eildert Groeneveld <eildert.groeneveld@fli.bund.de> wrote:
>  * one COPY per bulk (20 000 rows)
copy does not fit so well, as it is not only initial populating.

Why do you say COPY doesn't fit? It seems to me that COPY fits perfectly for your case, and would certainly make the load faster.

I suspect (not sure though) that the degradation is most because you are inserting one row at a time, and, it needs to verify FSM (Free Space Map) for each tuple inserted, when the table start to get more populated, this verification starts to become slower. If that is really the case, COPY would certainly improve that, or even INSERT with many rows at once.

Regards,
--
Matheus de Oliveira


pgsql-performance by date:

Previous
From: Eildert Groeneveld
Date:
Subject: Re: degrading inser performance
Next
From: Eildert Groeneveld
Date:
Subject: Re: degrading inser performance