Re: Does this matter?

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Wei Weng <wweng(at)kencast(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Does this matter?
Date: 2002-11-01 20:53:29
Message-ID: 20021101125052.Y6303-100000@cypress.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

> Wei,
>
> > Does it make a performance difference if I use a char(20) or a char(36)
> > as the primary key? My thought is no, but I would like to hear more
> > opinions.
>
> Yes, it does, though probably minor unless you have millions of records. CHAR
> is padded out to the specified length. Therefore the index on a char(36)
> column will be a little larger, and thus a little slower, than the char(20).
>

Really? According to this url (search for "Tip") there is no performance
difference just a space difference. I don't know for sure either way, but
if there is a difference the manual needs updating.

http://www.postgresql.org/idocs/index.php?datatype-character.html

-philip

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Sullivan 2002-11-01 21:10:57 Re: Does this matter?
Previous Message Wei Weng 2002-11-01 20:52:22 Re: Does this matter?

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2002-11-01 21:10:57 Re: Does this matter?
Previous Message Wei Weng 2002-11-01 20:52:22 Re: Does this matter?