Re: column size and storage efficiency

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: column size and storage efficiency
Дата
Msg-id 8761.1227712786@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: column size and storage efficiency  (Bruce Hyatt <brucejhyatt@yahoo.com>)
Список pgsql-novice
Bruce Hyatt <brucejhyatt@yahoo.com> writes:
> After thinking about it more, there can't be a direct relationship between number-of-characters and number-of-bits
butwhat I meant was, if varchar(14) fills a block of storage, does varchar(15) use 2 blocks? Does it use twice the
storage?

I think you still missed the point.  The *declared* size of a varchar
column isn't what determines storage usage, it's the *actual* size of
any particular value.  IOW, if all your strings are less than 15
characters, it makes no difference whether you declare the column
varchar(14), varchar(15), or varchar(6666).

            regards, tom lane

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

Предыдущее
От: Bruce Hyatt
Дата:
Сообщение: Re: column size and storage efficiency
Следующее
От: "Pushpendra Singh Thakur"
Дата:
Сообщение: PGCluster