| От | Tom Lane |
|---|---|
| Тема | Re: Postgres table size |
| Дата | |
| Msg-id | 14705.1195668842@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Postgres table size (SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com>) |
| Список | pgsql-general |
SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com> writes:
> 1. How do you find the MAXALIGN of the machine? And what is that used for?
pg_controldata will show "maximum data alignment". A rule of thumb is
that it's 4 on 32-bit machines and 8 on 64-bit machines, but there are
exceptions.
> 2. How does null columns account for this space.
If there are any nulls in a row then you pay for a null bitmap with 1
bit/column, but the null columns themselves aren't stored and hence
take zero space. In your example the bitmap needs 10 bits, but after
allowing for alignment the effect is that the heap tuple header gets
4 bytes bigger if there's any nulls.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера