Re: Reducing the overhead of NUMERIC data

From: "J(dot) Andrew Rogers" <jrogers(at)neopolitan(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing the overhead of NUMERIC data
Date: 2005-11-02 01:46:10
Message-ID: BF8D5A62.6BCF%jrogers@neopolitan.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 11/1/05 2:38 PM, "Jim C. Nasby" <jnasby(at)pervasive(dot)com> wrote:
>
> FWIW, most databases I've used limit NUMERIC to 38 digits, presumably to
> fit length info into 1 or 2 bytes. So there's something to be said for a
> small numeric type that has less overhead and a large numeric (what we
> have today).

The 38 digit limit is the decimal size of a 128-bit signed integer. The
optimization has less to do with the size of the length info and more to do
with fast math and fixed structure size.

J. Andrew Rogers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2005-11-02 03:56:48 Re: 8.1-compatible xlogdump
Previous Message Alvaro Herrera 2005-11-02 01:23:53 Re: 8.1-compatible xlogdump

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2005-11-02 04:11:06 Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags
Previous Message Neil Conway 2005-11-01 23:19:37 Re: Partitioning docs