From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: Matthew Sackman <matthew@lshift.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Massive performance issues
Date: Thu, 1 Sep 2005 15:33:31 -0400
Message-ID: <20050901193331.GA31313@surnet.cl> (raw)
In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB3417DD259@Herge.rcsinc.local>
References: <6EE64EF3AB31D5448D0007DD34EEB3417DD259@Herge.rcsinc.local>
On Thu, Sep 01, 2005 at 02:04:54PM -0400, Merlin Moncure wrote:
> > Table "public.address"
> > Column | Type | Modifiers
> > ----------------------+------------------------+-----------
> > postcode_top | character varying(2) | not null
> > postcode_middle | character varying(4) | not null
> > postcode_bottom | character varying(7) | not null
>
> consider making above fields char(x) not varchar(x) for small but
> important savings.
Huh, hang on -- AFAIK there's no saving at all by doing that. Quite the
opposite really, because with char(x) you store the padding blanks,
which are omitted with varchar(x), so less I/O (not necessarily a
measurable amount, mind you, maybe even zero because of padding issues.)
--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
You liked Linux a lot when he was just the gawky kid from down the block
mowing your lawn or shoveling the snow. But now that he wants to date
your daughter, you're not so sure he measures up. (Larry Greenemeier)
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: alvherre@alvh.no-ip.org, merlin.moncure@rcsonline.com, matthew@lshift.net
Subject: Re: Massive performance issues
In-Reply-To: <20050901193331.GA31313@surnet.cl>
* 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