From: | Shaun Thomas <sthomas(at)townnews(dot)com> |
---|---|
To: | Postgresql Admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Performance impact of record sizes |
Date: | 2002-07-05 15:00:23 |
Message-ID: | Pine.LNX.4.44.0207050856470.17612-100000@hamster.lee.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)townnews(dot)com AIM : trifthen |
| Web : www.townnews.com |
| |
| "Most of our lives are about proving something, either to |
| ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
From | Date | Subject | |
---|---|---|---|
Next Message | Stefano Coletta | 2002-07-05 15:15:32 | R: Authentication in batch processing |
Previous Message | Stefano Coletta | 2002-07-05 14:27:13 | R: Authentication in batch processing |