Re: [PATCHES] Avg performance for int8/numeric - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Avg performance for int8/numeric
Date
Msg-id 19371.1164561276@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Avg performance for int8/numeric  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: [PATCHES] Avg performance for int8/numeric  (Mark Kirkwood <markir@paradise.net.nz>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
> On Sat, 2006-11-25 at 18:57 +1300, Mark Kirkwood wrote:
>> Also Neil suggested investigating using a single composite type
>> {int8, 
>> numeric} for the {N,sum(X)} transition values. This could well be a 
>> faster way to do this (not sure how to make it work yet... but it
>> sounds 
>> promising...).

> If that is true it implies that any fixed length array is more expensive
> than using a composite type.

Not sure how you derived that conclusion from this statement, but it
doesn't appear to me to follow at all.  The reason for Neil's suggestion
was to avoid using numeric arithmetic to run a simple counter, and the
reason that this array stuff is expensive is that the array *components*
are variable-length, which is something that no amount of array
redesigning will eliminate.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [CORE] RC1 blocker issues
Next
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: "Optional ident" authentication