2009/3/6 Christian Schröder <c...@deriva.de> > Hi list, > if I want to find all records from a table that don't have a matching > record in another table there are at least two ways to do it: Using a left > outer join or using a subselect. I always thought that the planner would > create identical plans for both approaches, but actually they are quite > different which leads to a bad performance in one case. >
Couldn't you also use: SELECT fk FROM b EXCEPT SELECT id FROM a;