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 C053E52849 for ; Tue, 31 May 2005 01:09:08 -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 10465-10 for ; Tue, 31 May 2005 04:09:04 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 212E252843 for ; Tue, 31 May 2005 01:09:03 -0300 (ADT) Received: (qmail 21478 invoked by uid 500); 31 May 2005 04:08:01 -0000 Date: Mon, 30 May 2005 23:08:01 -0500 From: Bruno Wolff III To: Tobias Brox Cc: pgsql-performance@postgresql.org Subject: Re: Index on a NULL-value Message-ID: <20050531040801.GA21334@wolff.to> Mail-Followup-To: Bruno Wolff III , Tobias Brox , pgsql-performance@postgresql.org References: <20050531030207.GD26100@tobias.exoweb.net> <20050531031653.GA17723@wolff.to> <20050531033158.GI26100@tobias.exoweb.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050531033158.GI26100@tobias.exoweb.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/460 X-Sequence-Number: 12624 On Tue, May 31, 2005 at 11:31:58 +0800, Tobias Brox wrote: > [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. I missed that you turned sequential scans off for your test.