"Andrus" <kobruleht2(at)hot(dot)ee> writes:
> As you see simply removing constant expression
> '0' or
> produces different query plan which is much faster for large amoutnts of
> data.
The IN-pullup code runs before constant-simplification does, so it
doesn't see that as a simple join condition.
regards, tom lane