Re: The speed problem of Varchar vs. Char - Mailing list pgsql-general

From Martin Gainty
Subject Re: The speed problem of Varchar vs. Char
Date
Msg-id BAY108-DAV103F5CD9796B7BDBE6C393AE070@phx.gbl
Whole thread Raw
In response to The speed problem of Varchar vs. Char  (Crystal <support@conceptpatterns.com>)
List pgsql-general
Since VARCHAR length is run length encoded
and CHAR is fixed length
If your string will always be about the same size set as CHAR(MaximumLength)
otherwise use VARCHAR

M
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message -----
From: "Crystal" <support@conceptpatterns.com>
To: <pgsql-general@postgresql.org>
Sent: Sunday, July 08, 2007 7:15 PM
Subject: [GENERAL] The speed problem of Varchar vs. Char


> Hi All,
>
> Our company need to save contact details into the PostgreSQL database. I
> just begin to learn it, so I got many questions. I am not sure which data
> type I should choose for website address, varchar or char. The website
> address may be very long, and we also don't want to lose the speed. Thus,
> the question is: if we have a large contact database, how much slowdown or
> speed up will be expected if we choose variable length rather than fixed
> length? Thanks forward.
>
> Best Wishes,
> Crystal
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org/
>


pgsql-general by date:

Previous
From: Crystal
Date:
Subject: The speed problem of Varchar vs. Char
Next
From: "Josh Tolley"
Date:
Subject: Re: The speed problem of Varchar vs. Char