From: Tom Lane <tgl@sss.pgh.pa.us>
To: pginfo <pginfo@t1.unisoftbg.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: left join performance problem
Date: Wed, 11 Jun 2003 22:57:51 -0400
Message-ID: <26068.1055386671@sss.pgh.pa.us> (raw)
In-Reply-To: <3EE74C2D.88390062@t1.unisoftbg.com>
References: <3EE74C2D.88390062@t1.unisoftbg.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, pginfo@t1.unisoftbg.com
Subject: Re: left join performance problem
In-Reply-To: <26068.1055386671@sss.pgh.pa.us>
References: <3EE74C2D.88390062@t1.unisoftbg.com> <26068.1055386671@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox