From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeremy Haile <jhaile@fastmail.fm>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow inner join, but left join is fast
Date: Wed, 10 Jan 2007 13:38:15 -0500
Message-ID: <14865.1168454295@sss.pgh.pa.us> (raw)
In-Reply-To: <1168453218.22654.1168592237@webmail.messagingengine.com>
References: <1168445842.5566.1168570133@webmail.messagingengine.com>
<10060.1168449344@sss.pgh.pa.us>
<1168453218.22654.1168592237@webmail.messagingengine.com>
"Jeremy Haile" <jhaile@fastmail.fm> writes:
> I still don't understand why the inner join would be so different from
> the left join prior to the analyze.
Are you sure you hadn't analyzed in between? Or maybe autovac did it
for you? The reason for the plan change is the change from estimating
1 row matching the transaction_date range constraint, to estimating lots
of them, and the join type away up at the top would surely not have
affected that.
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jhaile@fastmail.fm
Subject: Re: Slow inner join, but left join is fast
In-Reply-To: <14865.1168454295@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