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@xxxxxxxxxxx Give your computer some brain candy! www.distributed.net Team #1828
Attachment:
pgpAFHpDtiLuu.pgp
Description: PGP signature