Re: R: R: space taken by a row & compressed data

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: R: R: space taken by a row & compressed data
Дата
Msg-id 412E4931.4010705@joeconway.com
обсуждение исходный текст
Ответ на Re: R: R: space taken by a row & compressed data  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Greg Stark wrote:
> Are toasted values stored in the table itself or in a separate table?

In a separate table if they exceed a threshold.

> My understanding was that it was the latter, which leads me to wonder whether
> he'll actually gain anything by having all the records in his table be
> toasted. It'll mean every record lookup has to traverse two indexes, and a
> sequential scan loses the sequential read performance boost.
>
> Or am I wrong and toasted values can be stored inline?
>

They can be, but are not by default. See:
   http://www.postgresql.org/docs/current/static/sql-altertable.html

SET STORAGE

     This form sets the storage mode for a column. This controls whether
this column is held inline or in a supplementary table, and whether the
data should be compressed or not. PLAIN must be used for fixed-length
values such as integer and is inline, uncompressed. MAIN is for inline,
compressible data. EXTERNAL is for external, uncompressed data, and
EXTENDED is for external, compressed data. EXTENDED is the default for
all data types that support it. The use of EXTERNAL will, for example,
make substring operations on a text column faster, at the penalty of
increased storage space.


Joe

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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Possible to insert quoted null value into integer field?
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: R: R: space taken by a row & compressed data