From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Alex O'Ree <alexoree@apache.org>
To: pgsql-general@lists.postgresql.org
Subject: Re: slow insert speeds with bytea
Date: Mon, 2 Dec 2019 07:52:16 -0800
Message-ID: <1d622f91-3fdb-b5dc-7972-7f9f5eb3e5fd@aklaver.com> (raw)
In-Reply-To: <CALLT8kjDadH2gZ+n1DnysZPw6rcQwfGv+2EfffuJ4N5+aZbVYw@mail.gmail.com>
References: <CALLT8kjDadH2gZ+n1DnysZPw6rcQwfGv+2EfffuJ4N5+aZbVYw@mail.gmail.com>
On 12/1/19 9:59 AM, Alex O'Ree wrote:
> Is there anything I can to increase insert speeds for bytea? Currently
> running postgres 9.6.15
>
> I have a few tables without a bytea and a few with bytea. There is a
> large performance difference with inserts between the two. I'm inserting
> a byte[] that's usually less than 1MB on content. The content itself is
> actually just utf8 string data.
>
> For the non-bytea table, inserts can be as high as 40k rows/sec, whereas
> the bytea table is closer to 4k/sec or less.
>
> If this is just a limitation of postgres, then that's fine but the
> performance delta is so significant that i feel like i'm missing something
It would help to have more information:
1) The schema of the table e.g. the output of \d in psql.
2) The actual INSERT query.
3) An EXPLAIN ANALYZE of the INSERT query.
--
Adrian Klaver
adrian.klaver@aklaver.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, alexoree@apache.org
Subject: Re: slow insert speeds with bytea
In-Reply-To: <1d622f91-3fdb-b5dc-7972-7f9f5eb3e5fd@aklaver.com>
References: <CALLT8kjDadH2gZ+n1DnysZPw6rcQwfGv+2EfffuJ4N5+aZbVYw@mail.gmail.com> <1d622f91-3fdb-b5dc-7972-7f9f5eb3e5fd@aklaver.com>
* 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