Re: [HACKERS] Improving planner's handling of min/max aggregate optimization

2010-11-03 Thread Robert Haas
On Mon, Nov 1, 2010 at 8:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: This will make the min/max optimization code more visible to the rest of the planner in a couple of ways: aside from being called at two places not one, it will have some intermediate state that'll have to be kept in

[HACKERS] Improving planner's handling of min/max aggregate optimization

2010-11-01 Thread Tom Lane
Now that we have MergeAppend in place, it strikes me that the current support for implementing MIN() and MAX() via indexscan+LIMIT subplans could be generalized to work on inheritance trees: a MergeAppend plan plus LIMIT would just about do it. However, extending the existing implementation in