Re: Runtime dependency from size of a bytea field - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Runtime dependency from size of a bytea field
Date
Msg-id AANLkTimFKPtR5oz5DBTkrDqctUwBtAk36EcBOqzt9t5v@mail.gmail.com
Whole thread Raw
In response to Runtime dependency from size of a bytea field  ("Sander, Ingo (NSN - DE/Munich)" <ingo.sander@nsn.com>)
Responses Re: Runtime dependency from size of a bytea field
List pgsql-performance
On Tue, Oct 5, 2010 at 3:23 AM, Sander, Ingo (NSN - DE/Munich)
<ingo.sander@nsn.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

pgsql-performance by date:

Previous
From: Dan Ports
Date:
Subject: Re: [HACKERS] MIT benchmarks pgsql multicore (up to 48)performance
Next
From: Jeff Davis
Date:
Subject: Re: Error message in wal_log for Streaming replication