Michael Lewis <mlewis@entrata.com> writes:
> Does the behavior change with different values of Ver column?
By and large, indxpath.c will just add all qual clauses that match
an index to the indexscan's conditions --- there's no attempt to
decide that some of them might not be worth it on cost grounds.
So I'd be pretty surprised if altering the Ver constant made any
difference. My money is on there being some reason why the IN
clause doesn't match the index, perhaps a type mismatch. Without
seeing the table schema, and the exact query, it's hard to say what
that reason is. (I'll not insult your intelligence by saying how
I know that the OP didn't just copy-and-paste that query.)
regards, tom lane