Re: [HACKERS] NUMERIC type efficiency problem

2001-04-13 Thread Tom Lane
Mark Butler <[EMAIL PROTECTED]> writes: > By the way, is alignment padding really a good use of disk space? Surely > storage efficiency trumps minor CPU overhead in any I/O bound database. Weren't you just complaining about excess palloc's ;-) ? Seriously, I have no idea about the costs/benefit

Re: [HACKERS] NUMERIC type efficiency problem

2001-04-13 Thread Mark Butler
Tom Lane wrote: > Yawn ... given row overhead, alignment padding, etc, this is not nearly > as big a deal as you make it ... For a table with ten decimal columns with an average of 5 significant digits apiece, each row could be reduced from ~170 bytes to about ~90 bytes, which could be rather si

Re: [HACKERS] NUMERIC type efficiency problem

2001-04-12 Thread Tom Lane
Mark Butler <[EMAIL PROTECTED]> writes: > I noticed the storage format for the numeric type is rather inefficient: > ... > A zero value uses two bytes total in Oracle, where in the current version of > PostgreSQL it uses ten bytes. Yawn ... given row overhead, alignment padding, etc, this is not

[HACKERS] NUMERIC type efficiency problem

2001-04-12 Thread Mark Butler
I noticed the storage format for the numeric type is rather inefficient: typedef struct NumericData { int32 varlen; /* Variable size*/ int16 n_weight; /* Weight of 1st digit */ uint16 n_rscale; /* Result scale */ uint16 n