pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeffrey Tenny <jeffrey.tenny@comcast.net>
To: pgsql-performance@postgresql.org
Subject: Null integer columns
Date: Wed, 05 Jan 2005 14:09:11 -0500
Message-ID: <41DC3B57.2040109@comcast.net> (raw)

I have an integer column that is not needed for some rows in the table
(whether it is necessary is a factor of other row attributes, and it 
isn't worth putting in a separate table).

What are the performance tradeoffs (storage space, query speed) of using 
NULL versus a sentinel integer value?

Not that it matters, but in the event where the column values matter,
the numberic value is a foreign key.  Advice on that welcome too.

Thanks!



view thread (3+ messages)  latest in thread

Message-ID: <41DC3B57.2040109@comcast.net>
Permalink:  ../41DC3B57.2040109@comcast.net/
Also on:    postgresql.org/message-id/41DC3B57.2040109@comcast.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jeffrey.tenny@comcast.net
  Subject: Re: Null integer columns
  In-Reply-To: <41DC3B57.2040109@comcast.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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