From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | josh(at)agliodbs(dot)com |
Cc: | Lorraine(dot)Dewey(at)companiongroup(dot)com (Lorraine Dewey), pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Optomizing left outer joins |
Date: | 2003-04-24 02:37:38 |
Message-ID: | 10221.1051151858@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Josh Berkus <josh(at)agliodbs(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-24 02:46:56 | Re: Why doesn't EXPLAIN ANALYZE show UPDATE step? |
Previous Message | Josh Berkus | 2003-04-23 20:51:53 | Re: Optomizing left outer joins |