Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am a newbie into partition. First I have a table with auto increment with its primary key and many other fields. I wanted to partition based on dataInsertDateTime column. It have me error so I had to rebuild the primary inclusive of the dataID and dataInsertDateTime which I think is correct step. I just tried like below scripts. How to verify if my partition is being build accordingly? I tried explain a query with the dataInsertTime<'2012-12-11' is showing me both p0 and p1. Kind of confuse here.

ALTER TABLE tblData PARTITION BY RANGE (to_days(`dataInsertDateTime`)) (
PARTITION p0 VALUES LESS THAN (to_days('2012-12-10')),
PARTITION p1 VALUES LESS THAN (to_days('2012-12-11')) )
share|improve this question
    
dataInsertTime<'2012-12-11' ranges over both those partitions. Try dataInsertTime>='2012-12-11' –  Mat Dec 9 '12 at 18:10
    
@mat just a side track are my procedures for the partition is correct? why must I set the po less than how if I need exactly for the day how to work it out? –  newbie14 Dec 10 '12 at 1:53
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.