Re: reducing NUMERIC size for 9.1 - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: reducing NUMERIC size for 9.1
Date
Msg-id 4C4055CB.8070801@archonet.com
Whole thread Raw
In response to Re: reducing NUMERIC size for 9.1  (Brendan Jurd <direvus@gmail.com>)
Responses Re: reducing NUMERIC size for 9.1
List pgsql-hackers
On 16/07/10 13:44, Brendan Jurd wrote:
>
> pg_column_size() did return the results I was expecting.
> pg_column_size(0::numeric) is 8 bytes on 8.4 and it's 6 bytes on HEAD
> with your patch.

> At this scale we should be seeing around 2 million bytes saved, but
> instead the tables are identical.  Is there some kind of disconnect in
> how the new short numeric is making it to the disk, or perhaps another
> effect interfering with my test?

You've probably got rows being aligned to a 4-byte boundary. You're 
probably not going to see any change unless you have a couple of 1-byte 
columns that get placed after the numeric. If you went from 10 bytes 
down to 8, that should be visible.

--   Richard Huxton  Archonet Ltd


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SHOW TABLES
Next
From: Pavel Stehule
Date:
Subject: Re: SHOW TABLES