Re: int8 version of NUMERIC? - Mailing list pgsql-general

From Jan Wieck
Subject Re: int8 version of NUMERIC?
Date
Msg-id 4006C5EB.4010608@Yahoo.com
Whole thread Raw
In response to Re: int8 version of NUMERIC?  (Adam Witney <awitney@sghms.ac.uk>)
List pgsql-general
Adam Witney wrote:

> On 12/1/04 3:28 pm, "Bruno Wolff III" <bruno@wolff.to> wrote:
>
>> On Sun, Jan 11, 2004 at 21:53:09 +0700,
>> David Garamond <lists@zara.6.isreserved.com> wrote:
>>>
>>> My concern is that, the PostgreSQL docs says NUMERIC & DECIMAL is very
>>> slow compared to INT/BIGINT. Should I worry about that?
>>
>> Most likely disk IO not cpu will be your bottleneck and the extra overhead
>> of numeric relative to int or float won't be a big deal.
>>
>> Numeric is stored usingh based 10000 (at least in 7.4.x) and hence isn't
>> that horrible performance-wise (as compared to say storing it as an ascii
>> string).
>
> Out of interest, where does the performance of storing at as TEXT suffer
> here... Reading or writing or both?

It starts suffering when you start "doing" something with the data, like
asking for the sum() or the avg(). But exactly at that time arbitrary
precision is IMHO needed, because we don't give the closest possible
approximation like MySQL, we give you a result.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-general by date:

Previous
From: Paul Ganainm
Date:
Subject: Re: serverless postgresql
Next
From: "Daniel E. Fisher"
Date:
Subject: Re: Errors after power failure