pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philip Hallstrom <philip@adhesivemedia.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: Wei Weng <wweng@kencast.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Does this matter?
Date: Fri, 1 Nov 2002 12:53:29 -0800 (PST)
Message-ID: <20021101125052.Y6303-100000@cypress.adhesivemedia.com> (raw)
In-Reply-To: <200211011223.48962.josh@agliodbs.com>

> 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




view thread (10+ messages)  latest in thread

Message-ID: <20021101125052.Y6303-100000@cypress.adhesivemedia.com>
Permalink:  ../20021101125052.Y6303-100000@cypress.adhesivemedia.com/
Also on:    postgresql.org/message-id/20021101125052.Y6303-100000@cypress.adhesivemedia.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-sql@postgresql.org
  Cc: philip@adhesivemedia.com, josh@agliodbs.com, wweng@kencast.com, pgsql-performance@postgresql.org
  Subject: Re: Does this matter?
  In-Reply-To: <20021101125052.Y6303-100000@cypress.adhesivemedia.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