Re: select max(column) from parent table very slow

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: select max(column) from parent table very slow
Дата
Msg-id 20060825144530.GA14622@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: select max(column) from parent table very slow  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: select max(column) from parent table very slow
Список pgsql-performance
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

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: select max(column) from parent table very slow
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: select max(column) from parent table very slow