Skip site navigation (1) Skip section navigation (2)

Re: Bloated Table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>, Alexander Schöcke <asc(at)turtle-entertainment(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Bloated Table
Date: 2009-05-27 20:21:59
Message-ID: 16375.1243455719@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> It's an interesting exercise in trying to estimate bloat without
>> groveling through the whole relation, but I seriously doubt you could
>> ever get numbers this way that are trustworthy enough to drive
>> maintenance decisions.

> Well, pg_stattuple is way too expensive to be running every minute ...

Agreed.  I was idly wondering whether it'd be useful to have an option
in pg_stattuple to sample some small fraction of the pages in a
relation, rather than exhaustively examining each one.  It'd be subject
to all the normal ills of sampling, of course, but I'd still trust it
way more than this view.  (Especially noting that the view is already
dependent on sampling anyway, since it's looking at pg_stats...)

			regards, tom lane

In response to

pgsql-general by date

Next:From: raul.giucichDate: 2009-05-27 20:30:29
Subject: Re: Favorite/Recommended ERD tools
Previous:From: Tom LaneDate: 2009-05-27 20:18:39
Subject: Re: Multidimensional array definition in composite type appears parsed as string

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group