pgsql-bloat-estimation
pgsql-bloat-estimation copied to clipboard
Ignore table-wide NULL ratio for partial indexes where NULL is excluded
Technically speaking, this now ignores pg_stats.null_frac for indexed column x when index definition has WHERE x IS NOT NULL.
This can fix some very skewed bloat estimates, for instance on a table with many million rows that indexes a column where only a few thousands rows are non-NULL.