Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 979DA9FA49F for ; Tue, 30 Jan 2007 02:49:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 31482-05 for ; Tue, 30 Jan 2007 02:49:01 -0400 (AST) X-Greylist: delayed 00:06:40.82117 by SQLgrey-1.7.4 Received: from web57108.mail.re3.yahoo.com (web57108.mail.re3.yahoo.com [216.252.111.121]) by postgresql.org (Postfix) with SMTP id A9D7A9FB3AE for ; Tue, 30 Jan 2007 02:49:02 -0400 (AST) Received: (qmail 78988 invoked by uid 60001); 30 Jan 2007 06:42:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=QBbwrP3E2wergAsdSH8hHsGXwyIAa6nHBFZDMlxEyzt+VuOdFfEURubrbSRsU2xBIlk2Lawo+OrTw3eimNRGwwODzIQePrU7CxD118EWXj7kXZ+NfHwIj1YnbcSVFnWPsqmDHE2wo13gGzXXvDYX4pvuLZwiy1xupvh9sUf0MKY=; X-YMail-OSG: JClAFpIVM1mCSkmb_cYCpjiC_fRoReUXg5I.ScUGvY64rOHxHQgC1C00GrMREgkS4aMbEI4cbEfsGlO7GtrScdy78ej9e_hp.v3EzTngKZiGY8hyH9ek1A-- Received: from [75.31.132.169] by web57108.mail.re3.yahoo.com via HTTP; Mon, 29 Jan 2007 22:42:20 PST Date: Mon, 29 Jan 2007 22:42:20 -0800 (PST) From: Abu Mushayeed Subject: Partitioning To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1079080611-1170139340=:78868" Content-Transfer-Encoding: 8bit Message-ID: <106956.78868.qm@web57108.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.131 tagged_above=0 required=5 tests=BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_30_40, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200701/411 X-Sequence-Number: 23012 --0-1079080611-1170139340=:78868 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I have partitioned a table based on period (e.g., cdate >= '2007-01-01'::date and cdate<=.2007-03-31':;date). Now, I am issuing query like cdate >= CURRENT_DATE - 1 and cdate <= CURRENT_DATE, it scans all the partitions. But if I do cdate >= '2007-01-01'::date and cdate<=.2007-03-31'::date it picks the correct partition. Also if I join the cdate field with another table, it does not pick the correct partition. I would like to know if it is possible to pick the correct partition using the above example. Thanks Abu --------------------------------- Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. --0-1079080611-1170139340=:78868 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I have partitioned a table based on period (e.g., cdate >= '2007-01-01'::date and cdate<=.2007-03-31':;date).

Now, I am issuing query like cdate >= CURRENT_DATE - 1 and cdate <= CURRENT_DATE, it scans all the partitions. But if I do cdate >= '2007-01-01'::date and cdate<=.2007-03-31'::date it picks the correct partition. Also if I join the cdate field with another table, it does not pick the correct partition.

I would like to know if it is possible to pick the correct partition using the above example.

Thanks
Abu


Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. --0-1079080611-1170139340=:78868--