Re: Optomizing left outer joins - Mailing list pgsql-sql

From Tom Lane
Subject Re: Optomizing left outer joins
Date
Msg-id 10221.1051151858@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optomizing left outer joins  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Josh Berkus <josh@agliodbs.com> writes:
> FWIW, outer joins are slower than regular joins on all RDBMSs I've tested -- 
> often up to 5 times slower.   I'm not sure whether this is just the planner 
> restricitons inherent in an outer join, or whether this is something about 
> the required join algorithm itself.

There isn't anything fundamentally slower about left join vs plain join
(unless, perhaps, the left join has to generate a really large number
of null-extended rows that the plain join would not generate).  My money
is on the left join having prevented some optimization that could be
applied in the plain-join case.  But since we have not been shown any
exact details of the tables or the query, it's impossible to do more
than wager...
        regards, tom lane



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Optomizing left outer joins
Next
From: Tom Lane
Date:
Subject: Re: Why doesn't EXPLAIN ANALYZE show UPDATE step?