Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] varchar(), text,char() overhead

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Darren King <darrenk(at)insightdist(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] varchar(), text,char() overhead
Date: 1998-01-22 02:40:30
Message-ID: 34C6B19E.47049082@sable.krasnoyarsk.su (view raw or flat)
Thread:
Lists: pgsql-hackers
Bruce Momjian wrote:
> 
> > > macros too.
> >
> > Would be a nice space-saver if you have tables with many small text fields.
> >
> > Dig out that old message of mine concerning block size and check out item #4.
> >
> > Excerpted below if you've finally deleted it... :) :)
> >
> > > Date: Wed, 29 Jan 1997 13:38:10 -0500
> > > From: aixssd!darrenk (Darren King)
> > > Subject: [HACKERS] Max size of data types and tuples.
> > > ...
> > > 4.  Since only 13 bits are needed for storing the size of these
> > > textual fields in a tuple, could PostgreSql use a 16-bit int to
> > > store it?  Currently, the size is padded to four bytes in the
> > > tuple and this eats space if you have many textual fields.
> > > Without further digging, I'm assuming that the size is double-word
> > > aligned so that the actual text starts on a double-word boundary.
> > > ...
> 
> I had forgotten about your mention of this.  I am running some tests
> now, and things look promising.  However, if we go to 64k or 128k
> tuples, we would be in trouble.  (We can do 64k tuples by changing the
          ^^^^^^^^^^^^^^^^^^^^^^
Also, multi-representation feature allows to have 2Gb in varlena fields.

> 'special variable' length value from -1 to 0.

Yes, it's way.

Vadim

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-01-22 02:49:00
Subject: Re: [HACKERS] Max size of data types and tuples. (fwd)
Previous:From: Bruce MomjianDate: 1998-01-22 01:06:11
Subject: Re: [HACKERS] varchar(), text,char() overhead

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group