Re: size of bytea + performance issues

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: tschak(at)web(dot)de
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, tschak <jochen(dot)schlosser(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: size of bytea + performance issues
Date: 2006-01-31 21:54:58
Message-ID: 20060131215458.GD95850@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 31, 2006 at 08:15:44PM +0100, Jochen Schlosser wrote:
> > Well, it's in the FAQ under "How much database disk space is required
> > to store data from a typical text file?" but the per tuple overhead is
> > between 36 and 44 bytes. depends a bit on the version.
>
> allright... thx a lot!
> I did not see this point in the FAQ because I am not storing data from
> a textfile and did not look in that direction... What store is
> basically a encoding scheme of several hash bins which store
> distances. Thus it is just a bitvector and to the best of my knowledge
> a bytea or varyiing bitarray is the most space efficient method to
> store my information(???).

It is if it's truely variable in length. If you know it's limited to say
4 bytes, you'd probably be better off with an int4, which doesn't have
the varlena overhead (4 bytes) that a bytea does.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-31 21:57:02 Re: Postgres 8.1 for Mac
Previous Message Jim C. Nasby 2006-01-31 21:49:50 Re: PostgreSQL + hibernate