Re: BUG #2730: strange query performance ! - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2730: strange query performance !
Date
Msg-id 17837.1162486833@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2730: strange query performance !  ("Baudracco Pierre" <pierre.baudracco@aliasource.fr>)
List pgsql-bugs
"Baudracco Pierre" <pierre.baudracco@aliasource.fr> writes:
> on a simple data model (a contact, linked to a company and categories
> categorizing a contact) this query takes more than 30 seconds !
> ...
> If I invert (only change) the LEFT JOIN clause the queries returns
> immediately

Existing Postgres releases do not consider rearranging the order of
outer joins, because they don't have the logic needed to determine
whether it's safe (will give the same answer) or not to change the
join order.  8.2 will be smarter.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2729: Backslash escaping not working as expected
Next
From: Tom Lane
Date:
Subject: Re: BUG #2728: Core dump while pgdump DB