Search Postgresql Archives

Re: The speed problem of Varchar vs. Char

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
To: <pgsql-general@xxxxxxxxxxxxxx>
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/




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux