Re: Datatype sizes; a space and speed issue?

From: Joel Matthew <rees(at)ddcom(dot)co(dot)jp>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Datatype sizes; a space and speed issue?
Date: 2004-06-23 04:47:09
Message-ID: 20040623134053.EA37.REES@ddcom.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Both text and varchar are stored in PostgreSQL as length + string so
> varchar(256) doesn't not require storage of the unused bytes. char space
> pads so it's the oddball (requiring length + padded string).

Yeah, I saw Vams's post and r3m3mb3r3d that I'd f0rg0t.

> varchar lengths should be in characters not bytes, so that should be 128
> characters in any of the encodings, but the actual number of bytes that
> those 128 characters can take up may vary.

And that's actually the best rationale, IMO, for making the optimization
a full-fledged feature. Boy, the things you forget ...

--
Joel Matthew <rees(at)ddcom(dot)co(dot)jp>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2004-06-23 04:51:39 Re: Datatype sizes; a space and speed issue?
Previous Message Stephan Szabo 2004-06-23 04:34:05 Re: Datatype sizes; a space and speed issue?