Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > That's very strange.
Not really. In the dummy example, the two indexes are exactly the same size and so there is no reason for the planner to prefer one over the other. (Note that the two plans have exactly the same estimated cost.) In a real example, with appropriate statistics from VACUUM or ANALYZE, the planner would tend to prefer the smaller index. If we had code to suppress the extra evaluation of the partial-index condition (which we do not) then possibly the planner would be able to favor the partial index on the grounds of less computation per row. I don't see any simple way to suppress those clauses early enough to let that cost difference figure into planning, though. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])