Skip site navigation (1) Skip section navigation (2)

Re: Partitioning

From: Rigmor Ukuhe <rigmor(dot)ukuhe(at)finestmedia(dot)ee>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Partitioning
Date: 2007-01-30 10:21:38
Message-ID: 45BF1C32.9000902@finestmedia.ee (view raw or flat)
Thread:
Lists: pgsql-performance
Abu Mushayeed wrote:
> 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.

from http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html

..."For the same reason, "stable" functions such as CURRENT_DATE must be 
avoided. Joining the partition key to a column of another table will not be 
optimized, either."...


Rigmor

> 
> Thanks
> Abu
> 
> ------------------------------------------------------------------------
> Need Mail bonding?
> Go to the Yahoo! Mail Q&A 
> <http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091> 
> for great tips from Yahoo! Answers 
> <http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091> 
> users. !DSPAM:5,45beea6d287779832115503!


-- 
Rigmor Ukuhe
Finestmedia Ltd | Software Development Team Manager
gsm : (+372)56467729 | tel : (+372)6558043 | e-mail : rigmor(dot)ukuhe(at)finestmedia(dot)ee

In response to

pgsql-performance by date

Next:From: Pomarede NicolasDate: 2007-01-30 10:54:05
Subject: Re: int4 vs varchar to store ip addr
Previous:From: John ParnefjordDate: 2007-01-30 10:05:03
Subject: Re: Tuning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group