On Wed, Nov 4, 2009 at 3:35 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "assaf" <assaf_lehr(at)yahoo(dot)com> writes:
>> PostgreSQL version: 8.37
>> Description: Poor performance with Left-join where right side does
>> not exist
>
> 8.4 might be smarter about this case for you. It's hard to tell for sure
> with so few details.
EXPLAIN output would be a good place to start, and EXPLAIN ANALYZE for
the queries that run quickly enough that you can let them run to
completion.
...Robert