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 233E852824 for ; Wed, 1 Jun 2005 02:43:46 -0300 (ADT) 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 45987-08 for ; Wed, 1 Jun 2005 05:43:37 +0000 (GMT) Received: from exobox.exoweb.net (unknown [221.122.43.98]) by svr1.postgresql.org (Postfix) with SMTP id 01DA25282A for ; Wed, 1 Jun 2005 02:43:24 -0300 (ADT) Received: (qmail 5924 invoked from network); 1 Jun 2005 05:43:01 -0000 Received: from exo185.exoweb.net (HELO tobias.nordicbet.invalid) (192.168.0.185) by 0 with SMTP; 1 Jun 2005 05:43:01 -0000 Received: by tobias.nordicbet.invalid (Postfix, from userid 500) id 81473E09C7; Wed, 1 Jun 2005 13:42:53 +0800 (CST) Date: Wed, 1 Jun 2005 13:42:51 +0800 From: Tobias Brox To: Tobias Brox Cc: pgsql-performance@postgresql.org Subject: Re: Index on a NULL-value Message-ID: <20050601054251.GT26100@tobias.exoweb.net> References: <20050531030207.GD26100@tobias.exoweb.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050531030207.GD26100@tobias.exoweb.net> Organization: Group Nordicbet User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/2 X-Sequence-Number: 12640 [Tobias Brox - Tue at 11:02:07AM +0800] > I read in the manual today: > > Indexes are not used for IS NULL clauses by default. The best way to use > indexes in such cases is to create a partial index using an IS NULL > predicate. I have summarized this thread in a postgresql doc user comment, posted at http://www.postgresql.org/docs/current/interactive/sql-createindex.html I think it's a good thing to do, since it can be difficult to search the mailing list archives :-) -- Tobias Brox, Beijing