Re: Speed of lo_unlink vs. DELETE on BYTEA

From: Eduardo Morras <nec556(at)retena(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Speed of lo_unlink vs. DELETE on BYTEA
Date: 2011-09-25 09:47:39
Message-ID: 4E5EF2B0006440E8@
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 07:43 25/09/2011, Reuven M. Lerner wrote:

>Hi, everyone. Daniel Verite
><mailto:daniel(at)manitou-mail(dot)org><daniel(at)manitou-mail(dot)org> wrote:
>
>It would thus appear that there's a slight edge
>for dumping bytea, but nothing
>super-amazing. Deleting, however, is still
>much faster with bytea than large objects.

The problem you have is with
compression/decompression on large objects. If
you see at it's sizes, you get 680KB for large
objects and 573MB for bytea. Postgresql needs to
decompress them before the dump. Even worse, if
your dump is compressed, postgres decompress each
large object , dump it and recompress. For this
test, switch off compression on large
objects/toast. For long term, perhaps a request
to postgresql hackers to directly dump the
already compressed large objects. The toast maybe
more difficult because there are not only big
size columns, but any column whose* size is
bigger than a threshold (don't remember now, 1-2KB or similar)

* Is it whose the correct word? I hope i have expressed correctly.

EFME

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-09-25 11:34:28 Re: looking for a faster way to do that
Previous Message Raghavendra 2011-09-25 09:26:56 Re: In which case PG_VERSION file updates ?