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
Ответ на
Список
Дерево обсуждения
Performance impact of record sizes John Moore <postgres@tinyvital.com>
Re: Performance impact of record sizes Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance impact of record sizes John Moore <postgres@tinyvital.com>
Re: Performance impact of record sizes Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance impact of record sizes Tom Lane <tgl@sss.pgh.pa.us>
Re: Performance impact of record sizes Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance impact of record sizes Tom Lane <tgl@sss.pgh.pa.us>
Re: Performance impact of record sizes Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance impact of record sizes Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance impact of record sizes Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance impact of record sizes John Moore <wx-chase@tinyvital.com>
Re: Performance impact of record sizes Shaun Thomas <sthomas@townnews.com>
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
Дата:
От: Stefano Coletta
Дата:
FAQ