Re: The speed problem of Varchar vs. Char

Поиск
Список
Период
Сортировка
От Tim Tassonis
Тема Re: The speed problem of Varchar vs. Char
Дата
Msg-id 469C8FD8.8090200@cubic.ch
обсуждение исходный текст
Ответ на Re: The speed problem of Varchar vs. Char  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
>
> Once upon a time, in the days of 80-column punch cards and no
> variable-length character encodings, there were databases that could
> handle fixed-width character fields a bit faster than variable-width.
> That doesn't apply to Postgres.  There is no, none, nada performance
> advantage to char(n), and you should never use it unless your
> application data clearly demands a specific field width.

I still often use char(n) a lot, mainly for documentation purposes. If a
column will only ever hold exactly a fixed length string (status codes
and stuff), it looks better in the datamodel to use char(n) IMHO.

Tim


В списке pgsql-general по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: interaction with postgres defined types in custom c functions
Следующее
От: "Erik Peterson"
Дата:
Сообщение: Update of table lags execution of statement by >1 minute?