Re: avg(int2) and avg(int8) micro-opt - Mailing list pgsql-patches

From Tom Lane
Subject Re: avg(int2) and avg(int8) micro-opt
Date
Msg-id 26163.1112628110@sss.pgh.pa.us
Whole thread Raw
In response to avg(int2) and avg(int8) micro-opt  (Neil Conway <neilc@samurai.com>)
Responses Re: avg(int2) and avg(int8) micro-opt
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> This patch changes int2_avg_accum() and int4_avg_accum() use the nodeAgg
> performance hack Tom introduced recently.

Why only those two?  Might as well make all the accum functions look alike.

> It is possible that the transition array might be TOAST'ed (not that I'd
> expect that to occur in practice, of course).

AFAICS that is impossible, since the transition value is never stored to
disk.  But your analysis is good anyway.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: avg(int2) and avg(int8) micro-opt
Next
From: Tom Lane
Date:
Subject: Re: DELETE ... USING