Re: Alternative variable length structure

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Alternative variable length structure
Дата
Msg-id 200509080953.52194.josh@agliodbs.com
обсуждение исходный текст
Ответ на Alternative variable length structure  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Ответы Re: Alternative variable length structure  (Rod Taylor <pg@rbt.ca>)
Re: Alternative variable length structure  ("J. Andrew Rogers" <jrogers@neopolitan.com>)
Re: Alternative variable length structure  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Список pgsql-hackers
Takahiro,

> PostgreSQL can treat variable-length data flexibly, but therefore
> it consumes more spaces if we store short data. Headers of
> variable-length types use 4 bytes regardless of the data length.
>
> My idea is to change the header itself to variable-length.
> In order to reduce the size of short data, I wrote a patch to encode
> lengths into the first several bits of structure. Also, the alignments
> of the types were changed to 'char' from 'int'.
>
> I know my patch is still insufficient, for example, the types cannot
> be TOASTed. But I guess this compression works well for short text.

Hmmm.  Seems like these would be different data types from the standard ones 
we deal with.  I can see the value for data warehousing, for example.   

Wouldn't this require creating, for example, a SHORTTEXT type?  Or were you 
planning this to handle VARCHAR(6) and the like?   If so, how would we deal 
with users who change the length via ALTER TABLE?

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: uuid type for postgres
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: initdb profiles