]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Allow create_index_paths() to consider multiple join bitmapscan paths.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Aug 2012 17:04:03 +0000 (13:04 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Aug 2012 17:04:03 +0000 (13:04 -0400)
commit26893906896d25b0119c57c90474c153bb8083c9
tree48a165256b0ab1b6c415bad889c36d2356804bb0
parentd6524697dba5967c7951c9a47107054660804900
Allow create_index_paths() to consider multiple join bitmapscan paths.

In the initial cut at the "parameterized paths" feature, I'd simplified
create_index_paths() to the point where it would only generate a single
parameterized bitmap path per relation.  Experimentation with an example
supplied by Josh Berkus convinces me that that's not good enough: we really
need to consider a bitmap path for each possible outer relation.  Otherwise
we have regressions relative to pre-9.2 versions, in which the planner
picks a plain indexscan where it should have used a bitmap scan in queries
involving three or more tables.  Indeed, after fixing this, several queries
in the regression tests show improved plans as a result of using bitmap not
plain indexscans.
src/backend/optimizer/path/indxpath.c
src/test/regress/expected/join.out