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 4B2983A19FF for ; Wed, 5 Jan 2005 19:09:39 +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 26981-08 for ; Wed, 5 Jan 2005 19:09:15 +0000 (GMT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by svr1.postgresql.org (Postfix) with ESMTP id 5A2773A1A1F for ; Wed, 5 Jan 2005 19:09:15 +0000 (GMT) Received: from [192.168.1.52] (h000d605e415b.ne.client2.attbi.com[24.60.119.214]) by comcast.net (sccrmhc12) with ESMTP id <20050105190912012003p65te>; Wed, 5 Jan 2005 19:09:12 +0000 Message-ID: <41DC3B57.2040109@comcast.net> Date: Wed, 05 Jan 2005 14:09:11 -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/100 X-Sequence-Number: 9790 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!