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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-performance by date

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