Null integer columns

From: Jeffrey Tenny <jeffrey(dot)tenny(at)comcast(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Null integer columns
Date: 2005-01-08 21:07:00
Message-ID: 41E04B74.8050609@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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
a NULL enabled column versus a NOT-NULL column with 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!

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-01-08 21:55:49 Re: Null integer columns
Previous Message Tom Lane 2005-01-08 05:49:07 Re: TEXT field and Postgresql Perfomance