Re: left outer join terrible slow compared to inner join - Mailing list pgsql-general

From Tom Lane
Subject Re: left outer join terrible slow compared to inner join
Date
Msg-id 14088.1062100367@sss.pgh.pa.us
Whole thread Raw
In response to Re: left outer join terrible slow compared to inner join  ("Clay Luther" <claycle@cisco.com>)
List pgsql-general
"Clay Luther" <claycle@cisco.com> writes:
> Here is the output of the above explain analyze execution:

Given the presence of this sort of thing:

>          ->  Nested Loop  (cost=1.15..17157470797.64 rows=1229 width=1976) (actual time=2723.56..104804.55 rows=1780
loops=1)
>                Join Filter: (("inner".tkservice = 11) AND ("inner".paramname = 'DefaultNetworkLocale'::character
varying))

I think you are running into 7.3's inability to determine that certain
outer joins can be simplified to regular joins (specifically, if there
is a strict operator above the OUTER JOIN that will reject null-extended
rows, then there's no need to generate null-extended rows at all).

7.4 should do better.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Vacuuming and already vacuumed table?
Next
From: Jonathan Bartlett
Date:
Subject: Re: Functions have 32 args limt ???