Tell me more ×
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 have a quite huge MySQL table. In my table I have date field. Recently I created another field called YearMonth which get year from date, multiple it to 100 and adds the month from date table to it. So if my date is 2013/07/09 my YearMonth field would be 201307.

Now I want to partition my table based on YearMonth field, but it seems to partition you need to specify some properties for your partion like:

PARTITION BY ... 
PARTITIONS someInt;

or

PARTITION BY ... 
PARTITIONS VALUES IN ...;

or

PARTITION BY ... 
PARTITIONS VALUES LESS THAN;

what I am looking for is to have a partition for each YearMonth field. And writing all of them would make one big list, which exceed every month, and I guess I need to add new values monthly. I was wondering if there is way to partition your table without specifying any properties or limitation.

share|improve this question

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.