Re: BUG #2730: strange query performance !

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Baudracco Pierre" <pierre(dot)baudracco(at)aliasource(dot)fr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2730: strange query performance !
Date: 2006-11-02 17:00:33
Message-ID: 17837.1162486833@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Baudracco Pierre" <pierre(dot)baudracco(at)aliasource(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-11-02 17:02:48 Re: BUG #2728: Core dump while pgdump DB
Previous Message Tom Lane 2006-11-02 16:57:11 Re: BUG #2729: Backslash escaping not working as expected