Re: Performance impact of record sizes - Mailing list pgsql-admin

From Shaun Thomas
Subject Re: Performance impact of record sizes
Date
Msg-id Pine.LNX.4.44.0207050856470.17612-100000@hamster.lee.net
Whole thread Raw
In response to Re: Performance impact of record sizes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Thu, 4 Jul 2002, Tom Lane wrote:

> I can think of very very few applications where CHAR(n) is really a
> sensible choice over VARCHAR(n).

text hashes such as MD5 and crypt, stock or serial numbers, automotive
VIN codes, invoice sequences, emulated bitmasks, etc.  Lots of
industry-specific things are non-varying sequences of characters.

Besides, you don't know true horror until you've seen an amateur set up
an entire database using nothing but text columns in all the tables.
Sometimes these types convey meaning about the data they contain, too.
^_^

> US state postal codes (CHAR(2)) are an example, but beyond that the
> valid use cases are mighty thin on the ground.

Don't forget zipcodes.  You can get away with a char(9), or a char(5)
and an optional char(4) for the postal extension.  ^_^

--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas                INN Database Administrator           |
| Phone: (309) 743-0812          Fax  : (309) 743-0830                |
| Email: sthomas@townnews.com    AIM  : trifthen                      |
| Web  : www.townnews.com                                             |
|                                                                     |
|     "Most of our lives are about proving something, either to       |
|      ourselves or to someone else."                                 |
|                                           -- Anonymous              |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+





pgsql-admin by date:

Previous
From: "Stefano Coletta"
Date:
Subject: R: Authentication in batch processing
Next
From: "Stefano Coletta"
Date:
Subject: R: Authentication in batch processing