pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Franck Routier <franck.routier@axege.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Does max size of varchar influence index size
Date: Tue, 01 Jul 2008 16:33:54 +0100
Message-ID: <486A4E62.40502@archonet.com> (raw)
In-Reply-To: <1214924736.668.22.camel@franck-laptop>
References: <1214845078.6710.7.camel@franck-laptop>
<1214857494.6049.76.camel@localhost>
<1214924736.668.22.camel@franck-laptop>
Franck Routier wrote:
> Le lundi 30 juin 2008 à 13:24 -0700, Mark Roberts a écrit :
>
> Hi Mark,
>
>> Is there any particular reason that you're not using a surrogate key?
>
> Well, human readability is the main reason, no standard way to handle
> sequences between databases vendors being the second... (and also
> problems when copying data between different instances of the database).
>
> So surrogate keys could be a way, and I am considering this, but I'd
> rather avoid it :)
Might be worth looking at 8.3 - that can save you significant space with
short varchar's - the field-length is no longer fixed at 32 bits but can
adjust itself automatically. Apart from the overheads, you need the
space to store the text in each string, not the maximum possible.
--
Richard Huxton
Archonet Ltd
view thread (4+ messages)
Message-ID: <486A4E62.40502@archonet.com> Permalink: ../486A4E62.40502@archonet.com/ Also on: postgresql.org/message-id/486A4E62.40502@archonet.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: dev@archonet.com, franck.routier@axege.com Subject: Re: Does max size of varchar influence index size In-Reply-To: <486A4E62.40502@archonet.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox