| From: | "David Rowley" <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | "'Simon Riggs'" <simon(at)2ndQuadrant(dot)com> |
| Cc: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Functional dependency in GROUP BY through JOINs |
| Date: | 2012-12-07 03:41:16 |
| Message-ID: | 007401cdd42c$b8a0d510$29e27f30$@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> From: Simon Riggs [mailto:simon(at)2ndQuadrant(dot)com]
> Sent: 07 December 2012 05:44
> To: David Rowley
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Functional dependency in GROUP BY through JOINs
>
> On 5 December 2012 23:37, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> > Though this plan might not be quite as optimal as it could be as it
> > performs the grouping after the join.
>
> PostgreSQL always calculates aggregation as the last step.
I didn't know that was always the case, but it makes sense I guess.
This is probably a bigger project than I imagined it would be then.
>
> It's a well known optimisation to push-down GROUP BY clauses to the lowest
> level, but we don't do that, yet.
>
> You're right that it can make a massive difference to many queries.
>
I agree.
Maybe it'd be something worthwhile for the future then. Perhaps if others
agree it should be something to go on the TODO list?
Regards
David Rowley
> --
> Simon Riggs http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavan Deolasee | 2012-12-07 03:51:50 | Re: Setting visibility map in VACUUM's second phase |
| Previous Message | David Rowley | 2012-12-07 03:38:03 | Re: Functional dependency in GROUP BY through JOINs |