Partition Selection You may also use a  PARTITION  option in the  SELECT  portion of an  INSERT ... SELECT  statement, as shown here: Partition selection can also be used with joins. Suppose we create and populate two tables using the statements shown here: You can explicitly select partitions (or subpartitions, or both) from any or all of the tables in a join. (The PARTITION  option used to select partitions from a given table immediately follows the name of the CREATE TABLE stores ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, city VARCHAR(30) NOT NULL ) PARTITION BY HASH(id) PARTITIONS 2; INSERT INTO stores VALUES (’’, ’Nambucca’), (’’, ’Uranga’), (’’, ’Bellingen’), (’’, ’Grafton’); CREATE TABLE departments ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) NOT NULL ) PARTITION BY KEY(id) PARTITIONS 2; INSERT INTO departments VALUES (’’, ’Sales’), (’’, ’Customer Service’), (’’, ’Delivery’), (’’, ’Accounting’); 4711 mysql>  CREATE TABLE employees_copy LIKE employees; Query OK, 0 rows affected (0.28 sec) mysql>  INSERT INTO employees_copy -> SELECT * FROM employees PARTITION (p2); Query OK, 5 rows affected (0.04 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql>  INSERT INTO employees_sub # reuse data in employees table -> SELECT * FROM employees; Query OK, 18 rows affected (0.09 sec) Records: 18 Duplicates: 0 Warnings: 0 mysql>  SELECT id, CONCAT(fname, ’ ’, lname) AS name -> FROM employees_sub PARTITION (p2sp1); +----+---------------+ | id | name | +----+---------------+ | 10 | Lou Waters | | 14 | Fred Goldberg | +----+---------------+ 2 rows in set (0.00 sec) +----+--------+----------+----------+---------------+ | id | fname | lname | store_id | department_id | +----+--------+----------+----------+---------------+ | 10 | Lou | Waters | 2 | 4 | | 11 | Jill | Stone | 1 | 4 | | 12 | Roger | White | 3 | 2 | | 13 | Howard | Andrews | 1 | 2 | | 14 | Fred | Goldberg | 3 | 3 | +----+--------+----------+----------+---------------+ mysql>  SELECT * FROM employees_copy; 5 rows in set (0.00 sec)