pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Goldner <mgoldner@agmednet.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Database size with large objects
Date: Mon, 05 Nov 2007 08:57:44 -0500
Message-ID: <18363.1194271064@sss.pgh.pa.us> (raw)
In-Reply-To: <C354417C.178A0%mgoldner@agmednet.com>
References: <C354417C.178A0%mgoldner@agmednet.com>

Michael Goldner <mgoldner@agmednet.com> writes:
> On 11/5/07 12:19 AM, "Tom Lane" <tgl@sss.pgh.pa.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



view thread (6+ messages)

Message-ID: <18363.1194271064@sss.pgh.pa.us>
Permalink:  ../18363.1194271064@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18363.1194271064@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mgoldner@agmednet.com
  Subject: Re: Database size with large objects
  In-Reply-To: <18363.1194271064@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox