From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Alex O'Ree <alexoree(at)apache(dot)org>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: slow insert speeds with bytea |
Date: | 2019-12-02 15:52:16 |
Message-ID: | 1d622f91-3fdb-b5dc-7972-7f9f5eb3e5fd@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Atkins | 2019-12-02 16:01:28 | Re: slow insert speeds with bytea |
Previous Message | David Steele | 2019-12-02 15:27:05 | Re: pgbackrest concerns and doubts. |