|
|
|
|
|
by lfittl
179 days ago
|
|
The article has a section where it estimates index bloat based on comparing the number of index reltuples * 40 bytes (?), compared to the size of the file on disk. This is problematic, first of all because I don't think the math is right (see [0] for a more comprehensive query that takes into account column sizes), and second because it ignores the effects of B-Tree index deduplication in Postgres 13+: [1] In my experience, fast bloat estimation queries can work okay for table bloat, but for index bloat I'd recommend instead looking at the change in page density over time (i.e. track relpages divided by reltuples), or just go direct to running pgstatindex outside business hours. [0]: https://github.com/pgexperts/pgx_scripts/blob/master/bloat/i...
[1]: https://www.postgresql.org/docs/current/btree.html#BTREE-DED... |
|