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" <[EMAIL PROTECTED]>
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/



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to