mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-30 19:17:20 +02:00
First, genericcostestimate() was being way too liberal about including partial-index conditions in its selectivity estimate, resulting in substantial underestimates for situations such as an indexqual "x = 42" used with an index on x "WHERE x >= 40 AND x < 50". While the code is intentionally set up to favor selecting partial indexes when available, this was too much... Second, choose_bitmap_and() was likewise easily fooled by cases of this type, since it would similarly think that the partial index had selectivity independent of the indexqual. Fixed by using predicate_implied_by() rather than simple equality checks to determine redundancy. This is a good deal more expensive but I don't see much alternative. At least the extra cost is only paid when there's actually a partial index under consideration. Per report from Jeff Davis. I'm not going to risk back-patching this, though. |
||
---|---|---|
.. | ||
access | ||
bootstrap | ||
catalog | ||
commands | ||
executor | ||
lib | ||
libpq | ||
main | ||
nodes | ||
optimizer | ||
parser | ||
po | ||
port | ||
postmaster | ||
regex | ||
rewrite | ||
storage | ||
tcop | ||
utils | ||
Makefile | ||
nls.mk |