Re: Massive performance issues

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Massive performance issues
Date: 2005-09-01 19:51:35
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3417DD25F@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> -----Original Message-----
> From: Alvaro Herrera [mailto:alvherre(at)alvh(dot)no-ip(dot)org]
> Sent: Thursday, September 01, 2005 3:34 PM
> To: Merlin Moncure
> Cc: Matthew Sackman; pgsql-performance(at)postgresql(dot)org
> Subject: Re: [PERFORM] Massive performance issues
>
> 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.)

You are right, all this time I thought there was a 4 byte penalty for
storing varchar type and not in char :(. So there is no reason at all
to use the char type?

Merlin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-01 19:53:47 Re: Massive performance issues
Previous Message Ron 2005-09-01 19:43:01 Re: Massive performance issues