pgsql-bloat-estimation icon indicating copy to clipboard operation
pgsql-bloat-estimation copied to clipboard

Ignore table-wide NULL ratio for partial indexes where NULL is excluded

Open rafbm opened this issue 5 years ago • 0 comments

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.

rafbm avatar Nov 11 '20 15:11 rafbm