From: Alvaro Herrera <alvherre@commandprompt.com>
To: Joshua D. Drake <jd@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Sriram Dandapani <sdandapani@counterpane.com>
Cc: Pgsql-Performance (E-mail) <pgsql-performance@postgresql.org>
Subject: Re: select max(column) from parent table very slow
Date: Fri, 25 Aug 2006 10:45:30 -0400
Message-ID: <20060825144530.GA14622@alvh.no-ip.org> (raw)
In-Reply-To: <44EE87BB.4050104@commandprompt.com>
References: <6992E470F12A444BB787B5C937B9D4DF057500BF@ca-mail1.cis.local>
<44EE4DA1.5060701@commandprompt.com>
<18394.1156480407@sss.pgh.pa.us>
<44EE87BB.4050104@commandprompt.com>
Joshua D. Drake wrote:
> Tom Lane wrote:
> >"Joshua D. Drake" <jd@commandprompt.com> writes:
> >>Sriram Dandapani wrote:
> >>>Parent table has a column say column1 which is indexed (parent table and
> >>>all child tables are indexed on that column)
> >
> >>In older versions of postgresql that would scan the whole table. In 8.1
> >>and above it doesn't. However, I am guess that since this is a
> >>partitioned table the planner isn't smart enough to just perform the
> >>query on each child and a max on the set that is returned.
> >
> >It is not. Feel free to submit a patch for planagg.c ...
>
> I think my patch to pgbench may have set your expectations of me a bit
> high ;)...
Actually I think this is the perfect opportunity for you -- a patch that
not only was absolutely unexpected, undiscussed, and posted without
previous warning, but one that you were actually asked about! And
weren't you recently joking about giving Tom nightmares by sending
patches to the optimizer?
--
Alvaro Herrera http://www.CommandPrompt.com/
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, jd@commandprompt.com, tgl@sss.pgh.pa.us, sdandapani@counterpane.com
Subject: Re: select max(column) from parent table very slow
In-Reply-To: <20060825144530.GA14622@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