From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Derek Neighbors <derek@gnue.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: CHAR vs VARCHAR
Date: Tue, 27 Feb 2001 11:18:14 -0500 (EST)
Message-ID: <200102271618.LAA15109@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.10.10102261238420.18535-100000@www.llamacom.com>
> 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?
FAQ item is accurate that compression happens on all variable length
types.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: pgman@candle.pha.pa.us, derek@gnue.org
Subject: Re: CHAR vs VARCHAR
In-Reply-To: <200102271618.LAA15109@candle.pha.pa.us>
References: <Pine.LNX.4.10.10102261238420.18535-100000@www.llamacom.com> <200102271618.LAA15109@candle.pha.pa.us>
* 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