Re: Performance impact of record sizes

Поиск
Список
Период
Сортировка
От Shaun Thomas
Тема Re: Performance impact of record sizes
Дата
Msg-id Pine.LNX.4.44.0207050856470.17612-100000@hamster.lee.net
обсуждение исходный текст
Ответ на Re: Performance impact of record sizes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Stefano Coletta"
Дата:
Сообщение: R: Authentication in batch processing
Следующее
От: "Stefano Coletta"
Дата:
Сообщение: R: Authentication in batch processing