Re: Improving PostgreSQL insert performance

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Frits Jalvingh <jal(at)etc(dot)to>
Cc: Kenneth Marshall <ktm(at)rice(dot)edu>, Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Improving PostgreSQL insert performance
Date: 2017-06-09 14:33:14
Message-ID: CAOR=d=1CYLvtesjcCmC95rWZSzJ02pYZyfJ8SA9jfx-CCekx3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jun 9, 2017 at 7:56 AM, Frits Jalvingh <jal(at)etc(dot)to> wrote:
> Hi Kenneth, Andreas,
>
> Thanks for your tips!
>
> I increased shared_buffers to 8GB but it has no measurable effect at all. I
> think that is logical: shared buffers are important for querying but not for
> inserting; for that the speed to write to disk seems most important- no big
> reason to cache the data if the commit requires a full write anyway.
> I also changed the code to do only one commit; this also has no effect I can
> see.
>
> It is true that Oracle had more memory assigned to it (1.5G), but unlike
> Postgres (which is completely on a fast SSD) Oracle runs on slower disk
> (ZFS)..
>
> I will try copy, but I first need to investigate how to use it- its
> interface seems odd to say the least ;) I'll report back on that once done.

I you want an example of copy, just pg_dump a table:

pg_dump -d smarlowe -t test

(SNIP)
COPY test (a, b) FROM stdin;
1 abc
2 xyz
\.
(SNIP)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kenneth Marshall 2017-06-09 14:36:37 Re: Improving PostgreSQL insert performance
Previous Message Frits Jalvingh 2017-06-09 13:56:58 Re: Improving PostgreSQL insert performance