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 BEAFE52815 for ; Tue, 31 May 2005 00:32:16 -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 66284-01 for ; Tue, 31 May 2005 03:32:12 +0000 (GMT) Received: from exobox.exoweb.net (unknown [221.122.43.98]) by svr1.postgresql.org (Postfix) with SMTP id 664925281B for ; Tue, 31 May 2005 00:32:09 -0300 (ADT) Received: (qmail 12590 invoked from network); 31 May 2005 03:31:58 -0000 Received: from exo185.exoweb.net (HELO tobias.nordicbet.invalid) (192.168.0.185) by 0 with SMTP; 31 May 2005 03:31:58 -0000 Received: by tobias.nordicbet.invalid (Postfix, from userid 500) id 8E495E09C5; Tue, 31 May 2005 11:31:58 +0800 (CST) Date: Tue, 31 May 2005 11:31:58 +0800 From: Tobias Brox To: pgsql-performance@postgresql.org Subject: Re: Index on a NULL-value Message-ID: <20050531033158.GI26100@tobias.exoweb.net> References: <20050531030207.GD26100@tobias.exoweb.net> <20050531031653.GA17723@wolff.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050531031653.GA17723@wolff.to> 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: 200505/457 X-Sequence-Number: 12621 [Tobias Brox] > test=# set enable_seqscan=off; [Bruno Wolff III - Mon at 10:16:53PM -0500] > It isn't surprising that an index wasn't used since a sequential scan is > going to be faster in your test case. > > If you want to test this out, you to want use realistically sized tables. Wrong. In this case I was not wondering about the planners choise of not using the index, but the fact that the planner could not find the index at all. Reproducing it on a simple table in a test environment was a valid strategy to solve this specific problem. -- Tobias Brox, Beijing