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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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