Re:
От | Manfred Koizar |
---|---|
Тема | Re: |
Дата | |
Msg-id | l559iuc6manb26ohn53cqu7du2a039ilpc@4ax.com обсуждение исходный текст |
Ответ на | ... (Francisco Reyes <lists@natserv.com>) |
Список | pgsql-general |
On Thu, 4 Jul 2002 14:06:31 -0400 (EDT), Francisco Reyes <lists@natserv.com> wrote: >How much space does "NULL" takes on a varchar. Francisco, the simple answer is: no space. The more complete answer is: The NULL state of all columns is stored in a bitmap. If a row does not contain any NULL column, the bitmap is omitted. So the first NULL in a row causes the bitmap to be created, more NULLs in the same row are free. In v7.2 the size of the bitmap is one bit per column (sic!) rounded up to an architecture specific value, usually 4 or 8 bytes. >I have a table where possibly less than 40% of the records will have a >value. I am wondering if I should go with a second table for those that >have the values or if NULL is small enough that it won't be much an >overhead for the possibly 60% instances when the column would be empty. If there are no other reasons for having a second table, don't bother with it. Servus Manfred
В списке pgsql-general по дате отправления: