Re: Improving avg performance for numeric - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Improving avg performance for numeric
Date
Msg-id 6577.1363711548@sss.pgh.pa.us
Whole thread Raw
In response to Re: Improving avg performance for numeric  (Hadi Moshayedi <hadi@moshayedi.net>)
Responses Re: Improving avg performance for numeric  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
[ please do not top-reply ]

Hadi Moshayedi <hadi@moshayedi.net> writes:
> On Tue, Mar 19, 2013 at 6:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Uh, what?  Fooling around with the implementation of avg() should surely
>> not change any planning decisions.

> I am not sure how this works, but I also changed numeric sum(), and the
> views in question had a numeric sum() column. Can that have any impact?

[ looks at patch... ]  Oh, I see what's affecting the plan: you changed
the aggtranstypes to internal for a bunch of aggregates.  That's not
very good, because right now the planner takes that to mean that the
aggregate could eat a lot of space.  We don't want that to happen for
these aggregates, I think.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Hadi Moshayedi
Date:
Subject: Re: Improving avg performance for numeric
Next
From: Jeff Davis
Date:
Subject: Re: Enabling Checksums