pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Storage space usage 2+ messages / 2 participants [nested] [flat]
* Storage space usage @ 2008-02-01 08:44 Gangadharan S.A. <gangadharan@gmail.com> 2008-02-02 06:37 ` Re: Storage space usage Decibel! <decibel@decibel.org> 0 siblings, 1 reply; 2+ messages in thread From: Gangadharan S.A. @ 2008-02-01 08:44 UTC (permalink / raw) To: pgsql-performance 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. 2) Similarly, if I have a text array, is an empty array optimized for storage? Thanks, Gangadharan ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Storage space usage 2008-02-01 08:44 Storage space usage Gangadharan S.A. <gangadharan@gmail.com> @ 2008-02-02 06:37 ` Decibel! <decibel@decibel.org> 0 siblings, 0 replies; 2+ messages in thread From: Decibel! @ 2008-02-02 06:37 UTC (permalink / raw) To: Gangadharan S.A. <gangadharan@gmail.com>; +Cc: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-02-02 06:37 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2008-02-01 08:44 Storage space usage Gangadharan S.A. <gangadharan@gmail.com> 2008-02-02 06:37 ` Decibel! <decibel@decibel.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox