Re: pgstattuple extension for indexes - Mailing list pgsql-hackers

From Satoshi Nagayasu
Subject Re: pgstattuple extension for indexes
Date
Msg-id 44E5269F.8000004@nttdata.co.jp
Whole thread Raw
In response to Re: pgstattuple extension for indexes  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
ITAGAKI Takahiro wrote:
> Suppose a simple update case, for example, the accounts table in pgbench.
> The default fillfactor of btree indexes is 90%, so the leaf pages are
> fully split after we update 10-20% of tuples. But pgstatindex reports
> the fragmentation is 50% in such condition, but I think we should do
> REINDEX then. My decision came from this.
> 
> The setting fillfactor=50% is better than the case with high fillfactor
> but all pages have split once, even if sizes of the indexes are same.
> I worry that users will misunderstand the 50% of fragmentation -- if the
> report says 100%, they'll consider to do REINDEX. But 50%, the necessity
> is unclear.

I think you should use 'average of page density' and 'number of leaf pages'
in such case. It is more useful to know filling condition of the leaves.

I've observed both while running pgbench, and the result is coming with
the WEB+DB PRESS magazine in next Wednesday. :)

Thanks.
-- 
NAGAYASU Satoshi <nagayasus@nttdata.co.jp>
Phone: +81-3-3523-8122


pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: pgstattuple extension for indexes
Next
From: Alvaro Herrera
Date:
Subject: Re: Can I assume there's only one _RETURN rule?