Re: Database size with large objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Goldner <mgoldner(at)agmednet(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database size with large objects
Date: 2007-11-05 13:57:44
Message-ID: 18363.1194271064@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Michael Goldner <mgoldner(at)agmednet(dot)com> writes:
> On 11/5/07 12:19 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It might be interesting to look at stats such as
>> select sum(length(data)) from pg_largeobject;
>> to confirm that your 100GB estimate for the data payload is accurate.

> That select returns the following:

> image=# select sum(length(data)) from pg_largeobject;
> sum
> --------------
> 215040008847
> (1 row)

Hmm, so given that you had 34803136 pages in pg_largeobject, that works
out to just about 75% fill factor. That is to say, you're only getting
3 2K rows per page and not 4. If the rows were full-size then 4 would
obviously not fit (there is some overhead...) but the normal expectation
in pg_largeobject is that tuple compression will shave enough space to
make up for the overhead and let you get 4 rows per page. Are your
large objects mostly pre-compressed data?

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-11-05 15:42:06 Re: Error Migrating From 7.4 to 8.2.5
Previous Message Tom Lane 2007-11-05 13:26:30 Re: Error Migrating From 7.4 to 8.2.5