Re: Runtime dependency from size of a bytea field

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: "Sander, Ingo (NSN - DE/Munich)" <ingo(dot)sander(at)nsn(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Runtime dependency from size of a bytea field
Date: 2010-10-05 16:11:29
Message-ID: AANLkTimFKPtR5oz5DBTkrDqctUwBtAk36EcBOqzt9t5v@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Oct 5, 2010 at 3:23 AM, Sander, Ingo (NSN - DE/Munich)
<ingo(dot)sander(at)nsn(dot)com> wrote:
> Hi,
>
> We have done the following test with PostgreSQL 9.0.
>
> create table bytea_demo ( index int, part1 bytea)");
>
> Then we have instantiated a loop (1000) with the following action:
>
> insert into bytea_demo ( index, part1, ) values ('%d', '%s');
>        ", i, entry);
>
> 1a) In a first measurement part is supported with a bytea area (entry) of
> 4000 bytes (4000 characters)
> 1b) In a second run part is supported with a bytea area (entry) of 5000
> bytes (5000 characters).
>
> Result: The runtime of case 1a) is ~ 3 sec, however for case 1b) the runtime
> is ~ 43 sec. Why here we have such a large difference in runtime.

Probably you are hitting toast threshold and running into compression.
compression you can disable, but toast you cannot (short of
recompiling with higher blocksz).

merlin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Davis 2010-10-05 21:05:17 Re: Error message in wal_log for Streaming replication
Previous Message Nimesh Satam 2010-10-05 09:11:49 Error message in wal_log for Streaming replication