Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D9B8D633216 for ; Tue, 1 Jun 2010 14:14:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 51378-02 for ; Tue, 1 Jun 2010 17:14:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id F162E632BCA for ; Tue, 1 Jun 2010 14:14:12 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 9303734C213; Tue, 1 Jun 2010 10:14:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tfqxn1jaeC9Y; Tue, 1 Jun 2010 10:14:08 -0700 (PDT) Received: from perhan.alvh.no-ip.org (190-95-18-247.bk17-dsl.surnet.cl [190.95.18.247]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id A57EF348002; Tue, 1 Jun 2010 10:14:08 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 89B016E8AB; Tue, 1 Jun 2010 13:14:06 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: David Jarvis , Tom Lane , Thom Brown , pgsql-performance Subject: Re: Optimize date query for large child tables: GiST or GIN? From: Alvaro Herrera To: Matthew Wakeling In-reply-to: References: <7143.1274382139@sss.pgh.pa.us> <7767.1274385170@sss.pgh.pa.us> <7917.1274385834@sss.pgh.pa.us> <8132.1274386738@sss.pgh.pa.us> Date: Tue, 01 Jun 2010 13:14:06 -0400 Message-Id: <1275412319-sup-2359@alvh.no-ip.org> User-Agent: Sup/0.11 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201006/10 X-Sequence-Number: 38866 Excerpts from Matthew Wakeling's message of mar jun 01 05:55:35 -0400 2010: > On Sun, 23 May 2010, David Jarvis wrote: > > The measurement table indexes (on date and weather station) were not being > > used because the only given date ranges (e.g., 1900 - 2009) were causing the > > planner to do a full table scan, which is correct. > > I wonder if you might see some benefit from CLUSTERing the tables on the > index. Eh, isn't this a GIN or GiST index? I don't think you can cluster on those, can you? -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support