pgsql: Fix choose_bitmap_and() so that partial index predicates are

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix choose_bitmap_and() so that partial index predicates are
Date: 2006-05-18 19:56:46
Message-ID: 20060518195646.C014B9FA48C@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix choose_bitmap_and() so that partial index predicates are considered when
deciding whether a potential additional indexscan is redundant or not. As now
coded, any use of a partial index that was already used in a previous AND arm
will be rejected as redundant. This might be overly restrictive, but not
considering the point at all is definitely bad, as per example in bug #2441
from Arjen van der Meijden. In particular, a clauseless scan of a partial
index was *never* considered redundant by the previous coding, and that's
surely wrong. Being more flexible would also require some consideration
of how not to double-count the index predicate's selectivity.

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
indxpath.c (r1.205 -> r1.206)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.205&r2=1.206)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-05-18 19:56:56 pgsql: Fix choose_bitmap_and() so that partial index predicates are
Previous Message User Xzilla 2006-05-18 19:19:03 dbsamples - pagila: re-org file layout to what I actually wanted to do