From: Kris Jurka <books@ejurka.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: No hash join across partitioned tables?
Date: Thu, 16 Apr 2009 21:02:04 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0904162046050.27034@leary.csoft.net> (raw)
In-Reply-To: <Pine.BSO.4.64.0904161921080.11937@leary.csoft.net>
References: <Pine.BSO.4.64.0904161836540.11937@leary.csoft.net>
<7163.1239923531@sss.pgh.pa.us>
<Pine.BSO.4.64.0904161921080.11937@leary.csoft.net>
On Thu, 16 Apr 2009, Kris Jurka wrote:
> Perhaps the cost estimates for the real data are so high because of this
> bogus row count that the fudge factor to disable mergejoin isn't enough?
>
Indeed, I get these cost estimates on 8.4b1 with an increased
disable_cost value:
nestloop: 11171206.18
merge: 58377401.39
hash: 116763544.76
So the default disable_cost isn't enough to push it to use the hash join
plan and goes back to nestloop. Since disable_cost hasn't been touched
since January 2000, perhaps it's time to bump that up to match today's
hardware and problem sizes? This isn't even a particularly big problem,
it's joing 18M rows against 30k.
The real problem is getting reasonable stats to pass through the partition
Append step, so it can make a reasonable estimate of the join output size.
Kris Jurka
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: books@ejurka.com, tgl@sss.pgh.pa.us
Subject: Re: No hash join across partitioned tables?
In-Reply-To: <Pine.BSO.4.64.0904162046050.27034@leary.csoft.net>
References: <Pine.BSO.4.64.0904161836540.11937@leary.csoft.net> <7163.1239923531@sss.pgh.pa.us> <Pine.BSO.4.64.0904161921080.11937@leary.csoft.net> <Pine.BSO.4.64.0904162046050.27034@leary.csoft.net>
* 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