Re: Fixed length data types issue

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Fixed length data types issue
Дата
Msg-id 87hczh89dc.fsf@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Fixed length data types issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fixed length data types issue  (Gregory Stark <gsstark@mit.edu>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> The performance costs of that seem pretty daunting, however, especially when
> you reflect that simply stepping over a varlena field would require
> memcpy'ing its length word to someplace.

I think if you give up on disk and in-memory representations being the same
then there are ways of finessing that. For example you could have all the
lengths together in the header prior to the variable length fields.

In a separate unrelated thought, if we bring back the idea of having logical
and physical field orders be distinct then we could also have the initial
table creation sort the fields to minimize padding. It won't always be perfect
but sometimes it could help quite a bit. It also wouldn't help much if you
start altering the table afterward but even then the next time you pg_dump and
reload you'll get a more efficient layout.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: Proposal for GUID datatype
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Schedualed Server Downtime