Re: Performance of subselects - Mailing list pgsql-general

From Thom Brown
Subject Re: Performance of subselects
Date
Msg-id bddc86150903090449g5441b5fcrcee147d66ce7e1e8@mail.gmail.com
Whole thread Raw
In response to Performance of subselects  (Christian Schröder <cs@deriva.de>)
List pgsql-general
2009/3/6 Christian Schröder <cs@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;

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Performance of subselects
Next
From: Joe Steeve
Date:
Subject: recovering databases in tablespace (lost main database)