]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix best_inner_indexscan to return both the cheapest-total-cost and
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 May 2007 01:40:42 +0000 (01:40 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 May 2007 01:40:42 +0000 (01:40 +0000)
commit107cbb2b9011e7179427aa67b35a97b49d572f6c
tree95709ca1fac67db588e3093d61bc647a4b4ce4b2
parent06df9a69e83396da87083bf5810855547b3ffff4
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.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/include/nodes/relation.h
src/include/optimizer/paths.h