Re: unused item pointers?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alan Stange <stange(at)rentec(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: unused item pointers?
Date: 2005-08-23 04:42:09
Message-ID: 28371.1124772129@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Alan Stange <stange(at)rentec(dot)com> writes:
> INFO: "tbltimeseries": found 8610108 removable, 26165807 nonremovable
> row versions in 5744789 pages
> DETAIL: 0 dead row versions cannot be removed yet.
> There were 235555635 unused item pointers.
> 0 pages are entirely empty.

The item pointers themselves are not very interesting --- at 4 bytes
apiece, they're only accounting for 2% of the table space. However
the fact that there are nearly 10x more unused than used ones suggests
that this table is suffering a pretty serious bloat problem. Assuming
constant-width rows in the table, that implies something like 90% of
the space in the table is unused. (contrib/pgstattuple might be useful
to confirm this estimate.)

VACUUM FULL, or perhaps better CLUSTER, would get you out of that. And
yes, you will need to vacuum more often afterwards if you want to keep
the bloat under control.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2005-08-23 05:01:37 Re: pgbench
Previous Message Lenard, Rohan (Rohan) 2005-08-23 03:41:32 Need indexes on empty tables for good performance ?