CHAR vs VARCHAR

From: Derek Neighbors <derek(at)gnue(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: CHAR vs VARCHAR
Date: 2001-02-26 18:46:03
Message-ID: Pine.LNX.4.10.10102261238420.18535-100000@www.llamacom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I browsed the FAQ and mailing list briefly to try to garner information
about the ups and downs of different character based datatypes. I did not
see any good document on preference or when to use one over the other.

http://postgresql.readysetnet.com/docs/faq-english.html#4.15 noted that
some compression happens.

http://postgresql.readysetnet.com/users-lounge/docs/7.0/user/datatype1066.htm
gives a good description and notes that text is best choice, but it not
being SQL compliant is an issue for most.

The question is how much of speed difference is there between CHAR and
VARCHAR when doing searches etc? or are there any good rules others use
to determine when CHAR is better to use than VARCHAR or vice versa?

Derek Neighbors
GNU Enterprise
http://www.gnue.org
derek(at)gnue(dot)org

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-02-27 03:16:35 Re: COPY doesn't works when containing ' ' or ' ' characters on db
Previous Message Michael Davis 2001-02-26 18:02:43 RE: relation does not exist