Re: [GENERAL] space-effective varchar(255)-like arrangement

From: Jan Vicherek <honza(at)ied(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] space-effective varchar(255)-like arrangement
Date: 1998-12-26 19:42:46
Message-ID: Pine.LNX.4.04.9812261439280.3549-100000@ann.ied.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hmm, let me guess ...

one of the overhead elements for each row header is pointer to the next
row, right ? That way the summing-up of varlena types is avoided, although
the postgres engine still has to go from row header to row header to find
Nth row in a page (block), right ?

Thx,

Jan

On Sat, 26 Dec 1998, Jan Vicherek wrote:

> On Sat, 26 Dec 1998, Bruce Momjian wrote:
> >
> > See the FAQ under character types. varcahr() does not store the max
> > space, only used space.
>
> hmm, thus if one block has 8192 bytes, and if there is 9-byte overhead
> for each row, then I can store 390 rows in one block if, on average,
> "names" are 10 chars in length ? echo $[ 8192 / ( 9 + 10 + 2 ) ] # = 390
>
> If each record has variable length, pg has no way of calculating where
> is start of next record, other than going through the block and summing up
> lengths of varchars to determine where does next record begin, right ?
> (above I use word "record" and "row" interchangeably).
>
> Thanx a bunch,
>
> Jan
>
>
>
> -- Gospel of Jesus is the saving power of God for all who believe --
> ## To some, nothing is impossible. ##
> http://Vicherek.Waterloo.on.ca/
>
>

-- Gospel of Jesus is the saving power of God for all who believe --
## To some, nothing is impossible. ##
http://Vicherek.Waterloo.on.ca/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1998-12-26 20:38:08 Re: [GENERAL] space-effective varchar(255)-like arrangement
Previous Message Bruce Momjian 1998-12-26 19:39:37 Re: [GENERAL] space-effective varchar(255)-like arrangement