Re: surprised to find bloat in insert-only table - Mailing list pgsql-admin

From Tom Lane
Subject Re: surprised to find bloat in insert-only table
Date
Msg-id 1739.1307122752@sss.pgh.pa.us
Whole thread Raw
In response to Re: surprised to find bloat in insert-only table  (Mark Stosberg <mark@summersault.com>)
List pgsql-admin
Mark Stosberg <mark@summersault.com> writes:
> Compared to 1669 MB reported as table bloat in the 'bloat' view. So,
> the bloat is about 40% of the total size.
> For an index, it's 410 MB of bloat, vs 1669 MB for an index size.

Hm ... 40% unused space wouldn't be surprising at all for an index.
The traditional rule of thumb for a b-tree index is that the steady
state fill factor is about 2/3rds.  You can do better for an index that
is loaded in increasing order (eg, an index on a serial or timestamp
column typically has a higher fill factor) but indexes on columns that
are more random are not going to see that.

> One thing that looks suspicious is that the exact same number of bytes
> is being report for the table as well as each index.

Um.  In that case I'd say your view is flat out wrong...

            regards, tom lane

pgsql-admin by date:

Previous
From: Mark Stosberg
Date:
Subject: Re: surprised to find bloat in insert-only table
Next
From: Michael Holt
Date:
Subject: Streaming replication status and fail over questions