Re: Use zero for nullness estimates of system attributes

Finnerty, Jim <jfinnert@amazon.com>

From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-hackers@postgresql.org
Date: 2019-01-25T17:41:52Z
Lists: pgsql-hackers
re: Yeah, none of our selectivity calculations account for the possibility
that we're above a join that has affected the distribution of a Var's
values.

Tom, there's an analogous issue of adjusting distinct values on a per-column
basis based on the selectivity of other local predicates.  Several
commercial RDBMS's make such adjustments in an effort to get better
selectivity estimates when there are multiple local predicates.  Is this
something that the PG community has considered and decided not to do because
of the additional planning-time overhead that may be required, or just
something that hasn't been discussed or tackled yet?



-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html


Commits

  1. Teach nulltestsel() that system columns are never NULL.