DDL for Partitioned Tables
The mechanism used for DDL operations on partitioned tables is somewhat different from the online
DDL discussed throughout this section. The partitioning clauses of the ALTER TABLE statement
are only allowed in conjunction with ALGORITHM=DEFAULT and LOCK=DEFAULT. Although these
operations do not go through the same internal online DDL API as for non-partitioned tables, MySQL
still attempts to minimize data copying and locking where possible:
• ADD PARTITION and DROP PARTITION for tables partitioned by RANGE or LIST do not copy any
existing data.
• TRUNCATE PARTITION does not copy any existing data, for all types of partitioned tables.
• Concurrent queries are allowed during ADD PARTITION and COALESCE PARTITION for tables
partitioned by HASH or LIST. MySQL copies the data while holding a shared lock.
• For REORGANIZE PARTITION, REBUILD PARTITION, or ADD PARTITION or COALESCE
PARTITION for a table partitioned by LINEAR HASH or LIST, concurrent queries are allowed. Data
from the affected partitions is copied while holding a shared lock.
... zobacz całą notatkę
Komentarze użytkowników (0)