"Andrus" <kobruleht2@xxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general