postgresql/src/backend
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
..
access Finish up XLOG_HINT renaming 2016-06-17 18:05:55 -04:00
bootstrap Revert CREATE INDEX ... INCLUDING ... 2016-04-08 21:52:13 +03:00
catalog pg_visibility: Add pg_truncate_visibility_map function. 2016-06-17 17:37:30 -04:00
commands Add VACUUM (DISABLE_PAGE_SKIPPING) for emergencies. 2016-06-17 15:48:57 -04:00
executor Fix handling of argument and result datatypes for partial aggregation. 2016-06-17 21:44:37 -04:00
foreign Fix whitespace 2016-04-11 14:44:51 -04:00
lib Remove mergeHyperLogLog. 2016-04-27 10:55:32 -04:00
libpq pgindent run for 9.6 2016-06-09 18:02:36 -04:00
main Repair a bit of pgindent damage. 2016-06-09 18:09:17 -04:00
nodes Restore foreign-key-aware estimation of join relation sizes. 2016-06-18 15:22:34 -04:00
optimizer Restore foreign-key-aware estimation of join relation sizes. 2016-06-18 15:22:34 -04:00
parser Fix handling of argument and result datatypes for partial aggregation. 2016-06-17 21:44:37 -04:00
po Translation updates 2016-05-09 10:04:41 -04:00
port pgindent run for 9.6 2016-06-09 18:02:36 -04:00
postmaster Avoid crash in "postgres -C guc" for a GUC with a null string value. 2016-06-16 12:17:38 -04:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:12:16 -05:00
replication pgindent run for 9.6 2016-06-09 18:02:36 -04:00
rewrite pgindent run for 9.6 2016-06-09 18:02:36 -04:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Finish up XLOG_HINT renaming 2016-06-17 18:05:55 -04:00
tcop Stop the executor if no more tuples can be sent from worker to leader. 2016-06-06 14:52:58 -04:00
tsearch pgindent run for 9.6 2016-06-09 18:02:36 -04:00
utils Restore foreign-key-aware estimation of join relation sizes. 2016-06-18 15:22:34 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Support multiple synchronous standby servers. 2016-04-06 17:18:25 +09:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00