Re: [HACKERS] Improving the accuracy of estimate_num_groups()

2010-01-27 Thread Hitoshi Harada
2010/1/23 Tom Lane : > I was just poking at the test case provided by Allen Johnson in bug > #5294.  The essence of the complaint is that the planner is choosing > a sort-and-GroupAggregate plan when a HashAggregate-and-then-sort > plan would be faster, because the aggregation steps are roughly the

[HACKERS] Improving the accuracy of estimate_num_groups()

2010-01-22 Thread Tom Lane
I was just poking at the test case provided by Allen Johnson in bug #5294. The essence of the complaint is that the planner is choosing a sort-and-GroupAggregate plan when a HashAggregate-and-then-sort plan would be faster, because the aggregation steps are roughly the same speed either way while