Re: Row size overhead

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: Row size overhead
Дата
Msg-id 2e78013d0803191023v53b355c8td492eac17892bc9c@mail.gmail.com
обсуждение исходный текст
Ответ на Row size overhead  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Ответы Re: Row size overhead  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Список pgsql-general
2008/3/19 Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>:

>
> Simple calculations show that each row occupies 76 bytes approximately.
>
> But anticipated row size would be 41 or near.
>

You haven't mentioned PG version. For 8.2 onwards, the tuple header is
23 bytes. Add another 4 bytes for one line pointer for each row. If you have
null values, another 5 bytes for null bitmap and alignment. Plus add few bytes
for page header and any unusable space in a page (because a row can not
fit in the remaining space).

Also ISTM that you might be loosing some space because of alignment
in the tuple itself. Try moving booleans and char(3) at the end. There is not
much you can do with other overheads.


Thanks,
Pavan



--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

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

Предыдущее
От: "Zubkovsky, Sergey"
Дата:
Сообщение: Row size overhead
Следующее
От: David Fetter
Дата:
Сообщение: Re: array_cat without duplicity