Re: Storage space usage

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: Storage space usage
Дата
Msg-id 20080202063709.GR1212@decibel.org
обсуждение исходный текст
Ответ на Storage space usage  ("Gangadharan S.A." <gangadharan@gmail.com>)
Список pgsql-performance
On Fri, Feb 01, 2008 at 02:14:18PM +0530, Gangadharan S.A. wrote:
> Hi,
> I have 2 questions regarding the storage optimization done by Postgres:
> 1) Is a NULL value optimized for storage. If I have a timestamp (or some
> such) field that I set to default NULL, will it still use up the full space
> for the data type.

Null values are indicated via a NULL bitmap. A null field is not stored,
it is just indicated in the bitmap.

> 2) Similarly, if I have a text array, is an empty array optimized for
> storage?

Arrays are stored as varlenas. I'm pretty sure than an empty array is
considered to be NULL; as such the comments above would apply.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Вложения

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

Предыдущее
От: "Gangadharan S.A."
Дата:
Сообщение: Storage space usage
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: slow 8.2.6 with 50 connections