diff options
author | Peter Eisentraut | 2025-06-30 09:28:11 +0000 |
---|---|---|
committer | Peter Eisentraut | 2025-06-30 09:30:56 +0000 |
commit | 960135114629bc89da0dd1d839541098c7e6401a (patch) | |
tree | 7998712db1c29b7094d24df131edc368b530c04f | |
parent | 3431e3e4aa3a33e8411f15e76c284cdd4c54ca28 (diff) |
doc: explain pgstatindex fragmentation
It was quite hard to guess what leaf_fragmentation meant without looking
at pgstattuple's code. This patch aims to give to the user a better
idea of what it means.
Author: Frédéric Yhuel <[email protected]>
Author: Laurenz Albe <[email protected]>
Reviewed-by: Bertrand Drouvot <[email protected]>
Reviewed-by: Benoit Lobréau <[email protected]>
Discussion: https://postgr.es/m/bf110561-f774-4957-a890-bb6fab6804e0%40dalibo.com
Discussion: https://postgr.es/m/[email protected]
-rw-r--r-- | doc/src/sgml/pgstattuple.sgml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml index 4071da4ed94..c747a5818ab 100644 --- a/doc/src/sgml/pgstattuple.sgml +++ b/doc/src/sgml/pgstattuple.sgml @@ -270,6 +270,15 @@ leaf_fragmentation | 0 page than is accounted for by <literal>internal_pages + leaf_pages + empty_pages + deleted_pages</literal>, because it also includes the index's metapage. + <literal>avg_leaf_density</literal> is the fraction of the index size that + is taken up by user data. Since indexes have a default fillfactor of 90, + this should be around 90 for newly built indexes of non-negligible size, + but usually deteriorates over time. + <literal>leaf_fragmentation</literal> represents a measure of disorder. + A higher <literal>leaf_fragmentation</literal> indicates that the + physical order of the index leaf pages increasingly deviates from their + logical order. This can have a significant impact if a large part + of the index is read from disk. </para> <para> |