Re: Unclear CHARACTER specification

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Unclear CHARACTER specification
Дата
Msg-id 20130104201152.4830@gmx.com
обсуждение исходный текст
Ответ на Unclear CHARACTER specification  (Lyle <webmaster@cosmicperl.com>)
Список pgsql-docs
Lyle wrote:

> Is there other documentation available that covers this?

You might want to read this page:

http://www.postgresql.org/docs/9.2/static/storage-toast.html

Note that there is seldom a good reason to use char(n) in
PostgreSQL for any value of n. As the page you cited mentions,
"While character(n) has performance advantages in some other
database systems, there is no such advantage in PostgreSQL; in fact
character(n) is usually the slowest of the three because of its
additional storage costs. In most situations text or character
varying should be used instead."

Don't try to micro-optimize by breaking what is logically a larger
string into 126 character pieces; that will defeat copression, take
more space to store, and add processing overhead. In other words,
such an attempt will almost certainly backfire.

-Kevin


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

Предыдущее
От: "Sahagian, David"
Дата:
Сообщение: doc page: ALTER VIEW
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: old testlo example code