"We cannot change the query being executed. Is there any way we can make the query planner ignore `OR (id IS NULL)` (as that will never be the case for the PK) and use both `id` clauses in the index condition?"
David J.
Yes, agreed. But if the query is supposed to be generic and re-used in a situation where id could be null, wouldn't the null id records be fetched every time?