Skip site navigation (1) Skip section navigation (2)

Re: left join performance problem

From: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: left join performance problem
Date: 2003-06-12 04:48:27
Message-ID: 3EE8061B.1FAED8AD@t1.unisoftbg.com (view raw or flat)
Thread:
Lists: pgsql-performance
Many thanks Tom,
the doc do not contain solution for this case, but the idea to
change the join order was excelent and all is working fine at the moment.

regards,
ivan.

Tom Lane wrote:

> pginfo <pginfo(at)t1(dot)unisoftbg(dot)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


In response to

Responses

pgsql-performance by date

Next:From: Andreas KostyrkaDate: 2003-06-12 09:32:09
Subject: Re: Table Relationships
Previous:From: Tom LaneDate: 2003-06-12 02:57:51
Subject: Re: left join performance problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group