Re: left join performance problem - Mailing list pgsql-performance

From Tom Lane
Subject Re: left join performance problem
Date
Msg-id 26068.1055386671@sss.pgh.pa.us
Whole thread Raw
In response to left join performance problem  (pginfo <pginfo@t1.unisoftbg.com>)
List pgsql-performance
pginfo <pginfo@t1.unisoftbg.com> writes:
> I have a big problem with pg left join performance.

I think the problem is that the LEFT JOIN clause is forcing the
planner to join A_SKLAD to A_MESKLAD before anything else, whereas
a good plan would do some of the other joins first to eliminate
as many rows as possible.  You will need to revise the query to
let the LEFT JOIN happen later.  For discussion see
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=explicit-joins.html

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: tweaking costs to favor nestloop
Next
From: pginfo
Date:
Subject: Re: left join performance problem