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