pgsql: When estimating without benefit of MCV lists (suggesting that one

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: When estimating without benefit of MCV lists (suggesting that one
Дата
Msg-id 20081023002451.2077D7545A4@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
When estimating without benefit of MCV lists (suggesting that one or both
inputs is unique or nearly so), make eqjoinsel() clamp the ndistinct estimates
to be not more than the estimated number of rows coming from the input
relations.  This allows the estimate to change in response to the selectivity
of restriction conditions on the inputs.

This is a pretty narrow patch and maybe we should be more aggressive about
similarly clamping ndistinct in other cases; but I'm worried about
double-counting the effects of the restriction conditions.  However, it seems
to help for the case exhibited by Grzegorz Jaskiewicz (antijoin against a
small subset of a relation), so let's try this for awhile.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        selfuncs.c (r1.256 -> r1.257)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.256&r2=1.257)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Dept of better ideas: refrain from creating the planner's
Следующее
От: petere@postgresql.org (Peter Eisentraut)
Дата:
Сообщение: pgsql: Feature T401 is not listed in the SQL standard.