MySQL Forums
Forum List  »  Partitioning

Re: How to (temporary) disable one partition in the partitioned table
Posted by: Mattias Jonsson
Date: February 28, 2013 05:51AM

in 5.6 you can do 'ALTER TABLE t EXCHANGE PARTITION p_to_disable WITH TABLE t_empty', which will switch the empty table t_empty to p_to_disable, effectively making that partition empty (you can then switch it back later...).
You can also use SELECT * from t PARTITION (p_all_but_one) to avoid using a specific partition (also usable in INSERT/UPDATE/LOAD/DELETE).

If you want to simulate a failure, then you can move the partitions data/index files as Rick suggests.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to (temporary) disable one partition in the partitioned table
2094
February 28, 2013 05:51AM


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.