pgsql: Improve eqjoinsel's ndistinct clamping to work for multiple leve

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve eqjoinsel's ndistinct clamping to work for multiple leve
Дата
Msg-id E1Qyr37-0001zv-M8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve eqjoinsel's ndistinct clamping to work for multiple levels of join.

This patch fixes an oversight in my commit
7f3eba30c9d622d1981b1368f2d79ba0999cdff2 of 2008-10-23.  That patch
accounted for baserel restriction clauses that reduced the number of rows
coming out of a table (and hence the number of possibly-distinct values of
a join variable), but not for join restriction clauses that might have been
applied at a lower level of join.  To account for the latter, look up the
sizes of the min_lefthand and min_righthand inputs of the current join,
and clamp with those in the same way as for the base relations.

Noted while investigating a complaint from Ben Chobot, although this in
itself doesn't seem to explain his report.

Back-patch to 8.4; previous versions used different estimation methods
for which this heuristic isn't relevant.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/53434c6f0dfa89bf287fadbde26b050b043c0c94

Modified Files
--------------
src/backend/utils/adt/selfuncs.c |   81 ++++++++++++++++++++++++++++++++++----
1 files changed, 73 insertions(+), 8 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: The replication status values in pg_stat_replication was changed
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve eqjoinsel's ndistinct clamping to work for multiple leve