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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Joshua D. Drake" <jd@xxxxxxxxxxxxxxxxx> 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 ...

			regards, tom lane


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux