zalando / PGObserver

A battle-tested, flexible & comprehensive monitoring solution for your PostgreSQL databases
https://zalando.github.io/PGObserver/
Other
315 stars 64 forks source link

Improve index bloat estimation #90

Open alexeyklyukin opened 7 years ago

alexeyklyukin commented 7 years ago

We had an index that was shown as 0,3 bloat ratio (meaning 0,3%) and 0 bytes to win by the PGObserver estimator, while the estimate at https://github.com/ioguix/pgsql-bloat-estimation/blob/master/btree/btree_bloat.sql shown it as 50% bloated.

After creating the new index with the same parameters it was indeed shown to be smaller than the original one. (the original one was 18GBs, and the replacement took only 7GB). Therefore, it looks like the bloat estimator needs to be re-examined.