From: | Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, "eng(at)intranet(dot)greenplum(dot)com" <eng(at)intranet(dot)greenplum(dot)com> |
Subject: | Re: Avg performance for int8/numeric |
Date: | 2006-11-25 00:28:28 |
Message-ID: | 45678E2C.4040403@paradise.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Neil Conway wrote:
> On Fri, 2006-11-24 at 11:08 +1300, Mark Kirkwood wrote:
>> - Modifies do_numeric_accum to have an extra bool parameter and does not
>> calc sumX2 when it is false.
>
> I think it would be clearer to reorganize this function slightly, and
> have only a single branch on "useSumX2". On first glance it isn't
> obviously that transdatums[2] is defined (but unchanged) when useSumX2
> is false.
>
Right - new patch attached that adds a new function do_numeric_avg_accum
that only uses N and sum(X). This means I could amend the avg aggregates
for numeric, int8 to have a initvalues of {0,0}.
Cheers
Mark
Attachment | Content-Type | Size |
---|---|---|
avg2.patch | text/x-patch | 7.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2006-11-25 00:46:22 | Re: Avg performance for int8/numeric |
Previous Message | Bruce Momjian | 2006-11-25 00:10:53 | Re: libpq-fe: PQgetvalue() ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2006-11-25 00:46:22 | Re: Avg performance for int8/numeric |
Previous Message | Bruce Momjian | 2006-11-24 23:43:36 | Re: [HACKERS] [PERFORM] Direct I/O issues |