pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: No hash join across partitioned tables?
Date: Thu, 25 Feb 2010 18:46:33 -0500 (EST)
Message-ID: <201002252346.o1PNkXG07892@momjian.us> (raw)
In-Reply-To: <12401.1240183911@sss.pgh.pa.us>


Did this get addressed?

---------------------------------------------------------------------------

Tom Lane wrote:
> Kris Jurka <books@ejurka.com> writes:
> > 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.
> 
> I dug around a bit and concluded that the lack of stats for the Append
> relation is indeed the main problem.  It's not so much the bad join size
> estimate (although that could hurt for cases where you need to join this
> result to another table).  Rather, it's that the planner is deliberately
> biased against picking hash joins in the absence of stats for the inner
> relation.  Per the comments for estimate_hash_bucketsize:
> 
>  * If no statistics are available, use a default estimate of 0.1.  This will
>  * discourage use of a hash rather strongly if the inner relation is large,
>  * which is what we want.  We do not want to hash unless we know that the
>  * inner rel is well-dispersed (or the alternatives seem much worse).
> 
> While we could back off the default a bit here, I think it'd be better
> to fix it by not punting on the stats-for-append-relations problem.
> That doesn't seem like material for 8.4 at this point, though.
> 
> 			regards, tom lane
> 
> -- 
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do
  + If your life is a hard drive, Christ can be your backup. +



view thread (23+ messages)  latest in thread

Message-ID: <201002252346.o1PNkXG07892@momjian.us>
Permalink:  ../201002252346.o1PNkXG07892@momjian.us/
Also on:    postgresql.org/message-id/201002252346.o1PNkXG07892@momjian.us

 · 

reply

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: bruce@momjian.us, tgl@sss.pgh.pa.us, books@ejurka.com
  Subject: Re: No hash join across partitioned tables?
  In-Reply-To: <201002252346.o1PNkXG07892@momjian.us>
  References: <12401.1240183911@sss.pgh.pa.us> <201002252346.o1PNkXG07892@momjian.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