Skip site navigation (1) Skip section navigation (2)

How are null's stored?

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: How are null's stored?
Date: 2003-05-12 19:01:56
Message-ID: 20030512190156.GA40542@flake.decibel.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
I have a 40M row table I need to import data into, then use to create a
bunch of more normalized tables. Right now all fields are varchar, but
I'm going to change this so that fields that are less than a certain
size are just char. Question is, how much impact is there from char
being nullable vs. not nullable? src/include/access/htup.h indicates
that nulls are stored in a bitmap, so I'd suspect that I should see a
decent space savings from not having to include length information all
the time... (most of these small fields are always the same size no
matter what...)
-- 
Jim C. Nasby (aka Decibel!)                    jim(at)nasby(dot)net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


Responses

pgsql-performance by date

Next:From: Alfranio JuniorDate: 2003-05-12 19:35:24
Subject: PERFORMANCE and SIZE
Previous:From: RyanDate: 2003-05-12 18:58:03
Subject: Re: How are null's stored?

pgsql-hackers by date

Next:From: Josh BerkusDate: 2003-05-12 20:44:43
Subject: Re: How are null's stored?
Previous:From: RyanDate: 2003-05-12 18:58:03
Subject: Re: How are null's stored?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group