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 260975E46CC for ; Mon, 30 Aug 2004 12:41:10 -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 39321-08 for ; Mon, 30 Aug 2004 15:41:13 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id 814445E471C for ; Mon, 30 Aug 2004 12:41:04 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1C1oHK-0002Dp-00; Mon, 30 Aug 2004 11:41:06 -0400 To: Guy Thornley Cc: pgsql-performance@postgresql.org Subject: Re: Why does a simple query not use an obvious index? References: <1093804128.5493.22.camel@localhost.localdomain> <87fz65k5sq.fsf@stark.xeocode.com> <16093.1093817023@sss.pgh.pa.us> <20040830081959.GC3714@conker.esphion.com> In-Reply-To: <20040830081959.GC3714@conker.esphion.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 30 Aug 2004 11:41:05 -0400 Message-ID: <87k6vgiqge.fsf@stark.xeocode.com> Lines: 11 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/442 X-Sequence-Number: 8078 Guy Thornley writes: > "stats__ends_at" btree (stats__ends_at("at", resolution, "values")) Postgres 7.4 doesn't have any stats on functional indexes. So it's back to just guessing at the selectivity of this. 8.0 does gather stats for functional indexes so it should be better off. -- greg