Re: Fixed length data types issue

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gregory Stark <gsstark(at)mit(dot)edu>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Martijn van Oosterhout <kleptog(at)svana(dot)org>
Subject: Re: Fixed length data types issue
Date: 2006-09-10 22:20:31
Message-ID: 200609102220.k8AMKVL02817@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Added to TODO:

* Consider ways of storing rows more compactly on disk

o Store disk pages with no alignment/padding?
o Reorder physical storage order to reduce padding?
o Support a smaller header for short variable-length fields?
o Reduce the row header size?

---------------------------------------------------------------------------

Gregory Stark wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>
> > I think it would be good to see if we can extend the varlena data types
> > to support a shorter header for storing short byte values. Looking at
> > the header now we have:
>
> This isn't the first time we've been down that route. There were some
> extensive discussions a while back. I think there were even patches.
> I don't remember why it was eventually rejected. I suspect it simply got too
> complex.
>
> But I think this is a dead-end route. What you're looking at is the number "1"
> repeated for *every* record in the table. And what your proposing amounts to
> noticing that the number "4" fits in a byte and doesn't need a whole word to
> store it. Well sure, but you don't even need a byte if it's going to be the
> same for every record in the table.
>
> If someone popped up on the list asking about whether Postgres compressed
> their data efficiently if they stored a column that was identical throughout
> the whole table you would tell them to normalize their data.
>
> --
> greg

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2006-09-10 22:23:20 Re: Fixed length data types issue
Previous Message Tom Lane 2006-09-10 22:07:02 pgsql: Install a cleaner solution to the AIX libpq linking problem, as