pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost
Дата
Msg-id 20070522014033.C60D19FB293@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix best_inner_indexscan to return both the cheapest-total-cost and
cheapest-startup-cost innerjoin indexscans, and make joinpath.c consider
both of these (when different) as the inside of a nestloop join.  The
original design was based on the assumption that indexscan paths always
have negligible startup cost, and so total cost is the only important
figure of merit; an assumption that's obviously broken by bitmap
indexscans.  This oversight could lead to choosing poor plans in cases
where fast-start behavior is more important than total cost, such as
LIMIT and IN queries.  8.1-vintage brain fade exposed by an example from
Chuck D.

Modified Files:
--------------
    pgsql/src/backend/nodes:
        outfuncs.c (r1.306 -> r1.307)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c.diff?r1=1.306&r2=1.307)
    pgsql/src/backend/optimizer/path:
        indxpath.c (r1.221 -> r1.222)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.221&r2=1.222)
        joinpath.c (r1.111 -> r1.112)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinpath.c.diff?r1=1.111&r2=1.112)
    pgsql/src/include/nodes:
        relation.h (r1.141 -> r1.142)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h.diff?r1=1.141&r2=1.142)
    pgsql/src/include/optimizer:
        paths.h (r1.97 -> r1.98)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/paths.h.diff?r1=1.97&r2=1.98)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Teach tuplestore.c to throw away data before the "mark" point
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost