From: Alvaro Herrera <alvherre@commandprompt.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: No hash join across partitioned tables?
Date: Sat, 16 Oct 2010 02:03:02 -0300
Message-ID: <1287205016-sup-542@alvh.no-ip.org> (raw)
In-Reply-To: <AANLkTinx8lLTEKWcyEQ1rxVz6WMJVKNezfXW5TKnNAU6@mail.gmail.com>
References: <201002252346.o1PNkXG07892@momjian.us>
<9477.1267142614@sss.pgh.pa.us>
<603c8f071003020816j77b3ec63wbad0415df003c0f1@mail.gmail.com>
<17546.1267546998@sss.pgh.pa.us>
<AANLkTinx8lLTEKWcyEQ1rxVz6WMJVKNezfXW5TKnNAU6@mail.gmail.com>
Excerpts from Robert Haas's message of mié jun 09 15:47:55 -0400 2010:
> In going back through emails I had marked as possibly needing another
> look before 9.0 is released, I came across this issue again. As I
> understand it, analyze (or analyse) now collects statistics for both
> the parent individually, and for the parent and its children together.
> However, as I further understand it, autovacuum won't actually fire
> off an analyze unless there's enough activity on the parent table
> considered individually to warrant it. So if you have an empty parent
> and a bunch of children with data in it, your stats will still stink,
> unless you analyze by hand.
So, is there something we could now do about this, while there's still
time before 9.1?
I haven't followed this issue very closely, but it seems to me that what
we want is that we want an ANALYZE in a child table to be mutated into
an analyze of its parent table, if the conditions are right; and that an
ANALYZE of a parent removes the child tables from being analyzed on the
same run.
If we analyze the parent, do we also update the children stats, or is it
just that we keep two stats for the parent, one with children and one
without, both being updated when the parent is analyzed?
If the latter's the case, maybe we should modify ANALYZE a bit more, so
that we can analyze the whole hierarchy in one go, and store the lot of
stats with a single pass (each child alone, the parent alone, the parent
plus children). However it's not real clear how would this work with
multiple inheritance levels.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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: alvherre@commandprompt.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, bruce@momjian.us, books@ejurka.com
Subject: Re: No hash join across partitioned tables?
In-Reply-To: <1287205016-sup-542@alvh.no-ip.org>
* 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