Re: size of bytea + performance issues - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: size of bytea + performance issues
Date
Msg-id 20060131215458.GD95850@pervasive.com
Whole thread Raw
In response to Re: size of bytea + performance issues  (Jochen Schlosser <jochen.schlosser@gmail.com>)
List 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@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: PostgreSQL + hibernate
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Postgres 8.1 for Mac