Re: slow insert speeds with bytea

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: "Alex O'Ree" <alexoree(at)apache(dot)org>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: slow insert speeds with bytea
Date: 2019-12-03 15:20:00
Message-ID: CAMkU=1zvDu2E-OFyJF1oYCNV3ayEBgZsgrNQAhrR8yyo7D0FGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 2, 2019 at 4:42 AM Alex O'Ree <alexoree(at)apache(dot)org> 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
>

That does seem pretty drastic. But I don't think we will get
anywhere unless you post your actual benchmarking program so that we can
try it for ourselves. I certainly don't see anything that drastic in my
own testing. Maybe the bottleneck is on the client side.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-12-03 15:27:51 Re: Syntax error for UPDATE ... RETURNING INTO STRICT
Previous Message Alexander Farber 2019-12-03 11:37:55 Re: Syntax error for UPDATE ... RETURNING INTO STRICT