Re: [PATCHES] sum(int4)/sum(int2) improvement

2005-09-15 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Atsushi Ogawa wrote: When sum(int4) or sum(int2) is executed, many cycles are spent by AllocSetReset. Because

Re: [PATCHES] sum(int4)/sum(int2) improvement

2005-09-15 Thread Bruce Momjian
Patch already applied in 8.1 in different way. --- Atsushi Ogawa wrote: When sum(int4) or sum(int2) is executed, many cycles are spent by AllocSetReset. Because per-tuple context is used to allocate the first data of

Re: [PATCHES] sum(int4)/sum(int2) improvement

2005-09-01 Thread Tom Lane
Atsushi Ogawa [EMAIL PROTECTED] writes: An attached patch uses AggState-aggcontext instead of per-tuple context to allocate the data. As a result, per-tuple context is not used, and the cycles of AllocSetReset is reduced. Why is this better than the fix already in place?

Re: [PATCHES] sum(int4)/sum(int2) improvement

2005-09-01 Thread Atsushi Ogawa
Tom Lane wrote: Atsushi Ogawa [EMAIL PROTECTED] writes: An attached patch uses AggState-aggcontext instead of per-tuple context to allocate the data. As a result, per-tuple context is not used, and the cycles of AllocSetReset is reduced. Why is this better than the fix already in place?

Re: [PATCHES] sum(int4)/sum(int2) improvement

2005-09-01 Thread Tom Lane
Atsushi Ogawa [EMAIL PROTECTED] writes: Tom Lane wrote: Why is this better than the fix already in place? Because per-tuple context is reset many times. If per-tuple context is never used, the following codes of AllocSetReset become effective. /* Nothing to do if context has never