Re: select max(column) from parent table very slow
От
Joshua D. Drake
Тема
Re: select max(column) from parent table very slow
Дата
Msg-id
44EE87BB.4050104@commandprompt.com
Ответ на
Список
Дерево обсуждения
select max(column) from parent table very slow "Sriram Dandapani" <sdandapani@counterpane.com>
Re: select max(column) from parent table very slow "Joshua D. Drake" <jd@commandprompt.com>
Re: select max(column) from parent table very slow Tom Lane <tgl@sss.pgh.pa.us>
Re: select max(column) from parent table very slow "Joshua D. Drake" <jd@commandprompt.com>
Re: select max(column) from parent table very slow Alvaro Herrera <alvherre@commandprompt.com>
Re: select max(column) from parent table very slow "Joshua D. Drake" <jd@commandprompt.com>
Tom Lane wrote:
> "Joshua D. Drake" 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 ;)...
Joshua D. Drake
>
> regards, tom lane
>
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
В списке pgsql-performance по дате отправления