Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 4A0071337B64 for ; Thu, 28 Oct 2010 15:50:33 -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 41235-04 for ; Thu, 28 Oct 2010 18:50:26 +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 F12C21337B55 for ; Thu, 28 Oct 2010 15:50:25 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 205C0348017; Thu, 28 Oct 2010 11:50:19 -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 dR-31veth4WJ; Thu, 28 Oct 2010 11:50:16 -0700 (PDT) Received: from [192.168.1.105] (unknown [75.142.155.118]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 5B8D0348015; Thu, 28 Oct 2010 11:50:16 -0700 (PDT) Subject: Re: partitioning question 1 From: "Joshua D. Drake" Reply-To: jd@commandprompt.com To: Ben Cc: pgsql-performance@postgresql.org In-Reply-To: References: <1288287092.22359.23.camel@jd-desktop> Content-Type: text/plain; charset="UTF-8" Organization: Command Prompt, Inc. Date: Thu, 28 Oct 2010 11:50:14 -0700 Message-ID: <1288291814.22359.31.camel@jd-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit 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: 201010/556 X-Sequence-Number: 40974 On Thu, 2010-10-28 at 11:44 -0700, Ben wrote: > > Yes the constraints have to be static. Not sure about the operator > > question honestly. > > this seems to severely restrict their usefulness -- our queries are data warehouse analytical -type queries, so the constraints are usually data-driven (come from joining against other tables.) Well it does and it doesn't. Keep in mind that the constraint can be: date >= '2010-10-01" and date <= '2010-10-31' What it can't be is something that contains date_part() or extract() (as an example) > > >> is my intuition completely off on this? > > > > You may actually want to look into expression indexes, not clustered > > ones. Take a look at the docs: http://www.postgresql.org/docs/8.4/interactive/indexes-expressional.html It "could" be considered partitioning without breaking up the table, just the indexes. Sincerely, Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt