X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B1DDC3A52BE for ; Sat, 8 Jan 2005 21:07:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55082-04 for ; Sat, 8 Jan 2005 21:07:00 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by svr1.postgresql.org (Postfix) with ESMTP id DEE143A52AA for ; Sat, 8 Jan 2005 21:07:01 +0000 (GMT) Received: from [192.168.1.52] (h000d605e415b.ne.client2.attbi.com[24.60.119.214]) by comcast.net (sccrmhc11) with ESMTP id <20050108210659011003bj29e>; Sat, 8 Jan 2005 21:06:59 +0000 Message-ID: <41E04B74.8050609@comcast.net> Date: Sat, 08 Jan 2005 16:07:00 -0500 From: Jeffrey Tenny User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Null integer columns Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.242 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: ** X-Archive-Number: 200501/91 X-Sequence-Number: 9781 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!