MySQL Forums
Forum List  »  Partitioning

Re: Can I add/change the number of hash subpartition?
Posted by: Mattias Jonsson
Date: August 26, 2011 04:13AM

There is no ALTER SUBPARTITION commands, so you need to give a complete ALTER TABLE for changing the subpartitions (It would need a full table copy to redistribute the data over the new subpartition schema anyway):

ALTER TABLE `test`
PARTITION BY RANGE (to_days(col2))
SUBPARTITION BY HASH (col1)
SUBPARTITIONS 12
(PARTITION p2008 VALUES LESS THAN (733773) ENGINE = MyISAM,
PARTITION p2009 VALUES LESS THAN (734138) ENGINE = MyISAM,
PARTITION p2010 VALUES LESS THAN (734503) ENGINE = MyISAM,
PARTITION p2011 VALUES LESS THAN (734868) ENGINE = MyISAM,
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM);

So you don't need to remove partitioning, but you have to specify a new partition structure.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Can I add/change the number of hash subpartition?
2281
August 26, 2011 04:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.