Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id AEBFB6327B9 for ; Mon, 1 Mar 2010 15:29:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 09339-04 for ; Mon, 1 Mar 2010 19:29:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 51E31632261 for ; Mon, 1 Mar 2010 15:29:27 -0400 (AST) Received: by pwj8 with SMTP id 8so1857314pwj.19 for ; Mon, 01 Mar 2010 11:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=UR47r7XKxUnen6E6wD5f0sah9gcgcugIvy67G1WpGyM=; b=XJhUcB2lcTwNRtPEE3G1bSen6wtbnAqUFEXiu5fZzvjDwYj+tcnm1XPq8tUwHF+AAX LS7/6OWaGXKHT3j/muG/uZ4ABEIae6/6Adj6Y96DXfSK1HUc5EROzTXpdY6xdKMDecfR WYH2GHysbpPGKgth1Fmy02wIfwV5LAqOB64Dk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=AYXQdAkOWr7HVp8fvgkeILVfUgTXtZJgaWFSJSl0Y82WQH6X6vR3SzoPr7bpahb4ZI VguJG2WFGXxozCrTZvAZuy2/o3BxQnt77vFO7Fzspuce49uXozXuw63raGqHfe2tjpAg 0nMz8cIRCxhoKwAW9XhiIzSWZvj9hM6Jmb8Hk= MIME-Version: 1.0 Received: by 10.140.252.5 with SMTP id z5mr2692475rvh.256.1267471766154; Mon, 01 Mar 2010 11:29:26 -0800 (PST) Date: Mon, 1 Mar 2010 11:29:26 -0800 Message-ID: Subject: partition pruning From: Anj Adu To: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.584 tagged_above=-10 required=5 tests=BAYES_20=-0.74, SUBJECT_FUZZY_TION=0.156 X-Spam-Level: X-Archive-Number: 201003/12 X-Sequence-Number: 37837 When I use intervals in my query e.g col1 between current_timestamp - interval '10 days' and current_timestamp...the optimizer checks ALL partitions whereas if I use col1 between 2 hardcoded dates..only the applicable partitions are scanned.