From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Frits Jalvingh <jal@etc.to>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Kenneth Marshall <ktm@rice.edu>
Cc: Andreas Kretschmer <andreas@a-kretschmer.de>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Improving PostgreSQL insert performance
Date: Sat, 10 Jun 2017 22:32:14 -0400
Message-ID: <20170611023214.r2yucev656ojv3pi@alvherre.pgsql> (raw)
In-Reply-To: <CAKhTGFXiU_t_EiB37q-H897pFqQY9a=hDAuAZV7T3dLMTsvSiw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Frits Jalvingh wrote:
> So, I am still very interested in getting normal inserts faster, because
> that will gain speed for all work.. If Oracle can do it, and Postgres is
> able to insert fast with copy- where lies the bottleneck with the insert
> command? There seems to be quite a performance hit with the JDBC driver
> itself (as the stored procedure is a lot faster), so I can look into that.
> But even after that there is quite a gap..
Did you try inserting multiple tuples in one command? Something like
INSERT INTO .. VALUES ('col1', 'col2'), ('col1', 'col2'), ('col1', 'col2')
It's supposed to be faster than single-row inserts, though I don't
know by how much.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvherre@2ndquadrant.com, jal@etc.to, scott.marlowe@gmail.com, ktm@rice.edu, andreas@a-kretschmer.de
Subject: Re: Improving PostgreSQL insert performance
In-Reply-To: <20170611023214.r2yucev656ojv3pi@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox