"s anwar" <sanwar(at)gmail(dot)com> writes:
> The two queries blow require radically different query times 1600ms vs 10ms:
Try not to be so fancy with a bunch of somewhat-overlapping partial indexes.
The planner is not so smart as you, and will not always be able to prove
to itself that it can use these indexes. A single, non-partial index on
ock would perform at least as well as this hodgepodge.
regards, tom lane