Обсуждение: pgsql: Fix mergejoin cost estimation so that we consider the statistical

Поиск
Список
Период
Сортировка

pgsql: Fix mergejoin cost estimation so that we consider the statistical

От
tgl@postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Fix mergejoin cost estimation so that we consider the statistical ranges of
the two join variables at both ends: not only trailing rows that need not be
scanned because there cannot be a match on the other side, but initial rows
that will be scanned without possibly having a match.  This allows a more
realistic estimate of startup cost to be made, per recent pgsql-performance
discussion.  In passing, fix a couple of bugs that had crept into
mergejoinscansel: it was not quite up to speed for the task of estimating
descending-order scans, which is a new requirement in 8.3.

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        costsize.c (r1.189 -> r1.190)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.189&r2=1.190)
    pgsql/src/backend/utils/adt:
        selfuncs.c (r1.241 -> r1.242)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.241&r2=1.242)
    pgsql/src/include/nodes:
        relation.h (r1.150 -> r1.151)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h?r1=1.150&r2=1.151)
    pgsql/src/include/utils:
        selfuncs.h (r1.41 -> r1.42)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/selfuncs.h?r1=1.41&r2=1.42)