ALTER TABLE
See copying InnoDB's transportable tablespaces for more information.
ALTER TABLE ... EXCHANGE PARTITION was introduced in MariaDB 10.0.4.
One of the best features in Oracle data warehousing is the ability to swap-out standard Oracle tables and partitioned tables. Oracle EXCHANGE PARTITION One of the most time-consuming processes in any data warehouse is the creation of the Extract, Transformation and Load (ETL) processes. The EXCHANGE PARTITION command will move a partition from a source table to target table and alter each table's metadata. alter table call exchange partition data_2007 with table call_temp; This command swaps over the definitions of the named partition and the CALL table, so that the data suddenly exists in the right place in the partitioned table. mysql> ALTER TABLE e EXCHANGE PARTITION p0 WITH TABLE e2; Query OK, 0 rows affected (0.28 sec) More precisely, the statement just issued causes any rows found in the partition to be swapped with those found in the table. About Partition Exchange Loading.
Partition Exchange is about being able to exchange a partition (or sub-partition) of a table with another (non-partitioned) table. alter table IBTRESDBA.APNTMT exchange partition Y14M05 with table IBTRESDBA_HIST.EXTAB_000_001_651 without validation update global indexes EXCHANGE PARTITION Elapsed: +0 00:01:28.508280 All indexes were usable after the DDL, but there didn't seem to be any performance improvement. ALTER TABLE sales EXCHANGE PARTITION p_sales_jun_2007 WITH TABLE sales_jun_2007 INCLUDING INDEXES; For more information about partition exchange load, refer to Partition Administration . The DDL statement to use for performing Exchange Partition goes like this: ALTER TABLE
For a range partition table without index and constraint, if exchange one partition, say partition m3, with a table using clause "without validation", then rows stay in m3 after exchange might need to stay in a different partition if the definition of range partition is strictly followed. To exchange partition p0 in table e with table e2, you can use the ALTER TABLE statement shown here: .
... Alter existing partitioned table.