Re: Row size overhead
От
Zubkovsky, Sergey
Тема
Re: Row size overhead
Дата
Msg-id
528853D3C5ED2C4AA8990B504BA7FB850106DF21@sol.transas.com
Ответ на
Re: Row size overhead (Pavan Deolasee)
Список
Дерево обсуждения
Row size overhead "Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>
Re: Row size overhead "Pavan Deolasee" <pavan.deolasee@gmail.com>
Re: Row size overhead "Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>
Re: Row size overhead Adrian Klaver <aklaver@comcast.net>
Re: Row size overhead "Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>
Thanks for your reply. I had used PG 8.3.1 on 32-bit WinXP platform. "PostgreSQL 8.3.1, compiled by Visual C++ build 1400" But I suppose this fact doesn't change anything essentially. Thanks, Sergey Zubkovsky -----Original Message----- From: Pavan Deolasee [mailto:pavan.deolasee@gmail.com] Sent: Wednesday, March 19, 2008 8:23 PM To: Zubkovsky, Sergey Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Row size overhead 2008/3/19 Zubkovsky, Sergey : > > 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 по дате отправления
От: Angus B. Atkins-Trimnell
Дата:
От: Tom Lane
Дата: