Re: [HACKERS] Cardinality estimation for group by

2016-10-05 Thread Robert Haas
On Tue, Oct 4, 2016 at 8:05 AM, Chenxi Li wrote: > How is cardinality estimation for "group by" is done and where is the code > doing that? I would suggest that you start by looking at estimate_num_groups() in src/backend/utils/adt/selfuncs.c. You might also want to look at cost_agg() in src/bac

[HACKERS] Cardinality estimation for group by

2016-10-04 Thread Chenxi Li
Friends, How is cardinality estimation for "group by" is done and where is the code doing that? Best Regards, Chenxi Li