Re: postgresql storage and performance questions

Поиск
Список
Период
Сортировка
От Trevor Talbot
Тема Re: postgresql storage and performance questions
Дата
Msg-id 90bce5730711192137v65f8d320ped70d5a0bdfc4d34@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgresql storage and performance questions  ("Josh Harrison" <joshques@gmail.com>)
Ответы Re: postgresql storage and performance questions  ("Josh Harrison" <joshques@gmail.com>)
Список pgsql-general
On 11/19/07, Josh Harrison <joshques@gmail.com> wrote:

> I have 2 tables with 2 cols each( 1 numeric(8,0) and 1 varchar(3) ).
> In table1 both the cols are filled and in table2  the varchar colm is null
>
> So when I checked the tablesize for these two tables (using pg_relation_size)
> table1 - 57344 bytes (no null columns)
> table2 - 49152 bytes (varchar colm is null)
>
> There is not much difference between the two sizes.So even if a column
> is null postgresql still has lots of overhead.
>  Does postgres occupy space even when the column is NULL?

PostgreSQL's disk storage works in "pages", where each page is 8KB.
It will use as much space within each page as it can.  Filip's last
link details this.

Is there a specific reason you're looking at this, as in you have some
requirement to meet?  Or just curious how it works?

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

Предыдущее
От: "Sean Davis"
Дата:
Сообщение: Re: plpython array support
Следующее
От: Philip Semanchuk
Дата:
Сообщение: plpythonu under OS X 10.4 -- a brief HOWTO