postgresql/src/backend/optimizer/path
Tom Lane 100340e2dc Restore foreign-key-aware estimation of join relation sizes.
This patch provides a new implementation of the logic added by commit
137805f89 and later removed by 77ba61080.  It differs from the original
primarily in expending much less effort per joinrel in large queries,
which it accomplishes by doing most of the matching work once per query not
once per joinrel.  Hopefully, it's also less buggy and better commented.
The never-documented enable_fkey_estimates GUC remains gone.

There remains work to be done to make the selectivity estimates account
for nulls in FK referencing columns; but that was true of the original
patch as well.  We may be able to address this point later in beta.
In the meantime, any error should be in the direction of overestimating
rather than underestimating joinrel sizes, which seems like the direction
we want to err in.

Tomas Vondra and Tom Lane

Discussion: <31041.1465069446@sss.pgh.pa.us>
2016-06-18 15:22:34 -04:00
..
allpaths.c Invent min_parallel_relation_size GUC to replace a hard-wired constant. 2016-06-16 13:47:20 -04:00
clausesel.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
costsize.c Restore foreign-key-aware estimation of join relation sizes. 2016-06-18 15:22:34 -04:00
equivclass.c Restore foreign-key-aware estimation of join relation sizes. 2016-06-18 15:22:34 -04:00
indxpath.c Revert CREATE INDEX ... INCLUDING ... 2016-04-08 21:52:13 +03:00
joinpath.c Fix planner crash from pfree'ing a partial path that a GatherPath uses. 2016-04-30 12:29:21 -04:00
joinrels.c Support parallel joins, and make related improvements. 2016-01-20 14:40:26 -05:00
Makefile Extract restriction OR clauses whether or not they are indexable. 2013-12-30 12:24:37 -05:00
pathkeys.c Revert CREATE INDEX ... INCLUDING ... 2016-04-08 21:52:13 +03:00
tidpath.c Update copyright for 2016 2016-01-02 13:33:40 -05:00