Re: Improving avg performance for numeric

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hadi Moshayedi <hadi(at)moshayedi(dot)net>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "mark(dot)kirkwood(at)catalyst(dot)net(dot)nz" <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Subject: Re: Improving avg performance for numeric
Date: 2013-03-19 16:45:48
Message-ID: 6577.1363711548@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[ please do not top-reply ]

Hadi Moshayedi <hadi(at)moshayedi(dot)net> writes:
> On Tue, Mar 19, 2013 at 6:25 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2013-03-19 17:18:08 Re: Enabling Checksums
Previous Message Hadi Moshayedi 2013-03-19 16:37:18 Re: Improving avg performance for numeric