Re: upper planner path-ification
От | David Rowley |
---|---|
Тема | Re: upper planner path-ification |
Дата | |
Msg-id | CAKJS1f_m8m=31noDxcsv2mAxZu1d8bqN43m7fjf-tXPtTX=uSg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: upper planner path-ification (Kouhei Kaigai <kaigai@ak.jp.nec.com>) |
Ответы |
Re: upper planner path-ification
|
Список | pgsql-hackers |
On 23 June 2015 at 13:55, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
Once we support to add aggregation path during path consideration,
we need to pay attention morphing of the final target-list according
to the intermediate path combination, tentatively chosen.
For example, if partial-aggregation makes sense from cost perspective;
like SUM(NRows) of partial COUNT(*) AS NRows instead of COUNT(*) on
billion rows, planner also has to adjust the final target-list according
to the interim paths. In this case, final output shall be SUM(), instead
of COUNT().
This sounds very much like what's been discussed here:
The basic concept is that we add another function set to aggregates that allow the combination of 2 states. For the case of MIN() and MAX() this will just be the same as the transfn. SUM() is similar for many types, more complex for others. I've quite likely just borrowed SUM(BIGINT)'s transfer functions to allow COUNT()'s to be combined.
More time does need spent inventing the new combining functions that don't currently exist, but that shouldn't matter as it can be done later.
Commitfest link to patch here https://commitfest.postgresql.org/5/131/
I see you've signed up to review it!
Regards
David Rowley
--
David Rowley http://www.2ndQuadrant.com/
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: