Adding and Dropping Table Partitions
One of the most useful features of partitioned tables is that you can add and drop entire partitions of table data in bulk. If the table partitions are set up properly, these commands can take place in seconds, without the expensive input/output (I/O) costs of physically copying or moving the data. You can add and drop table partitions by using the SPLIT RANGE
and MERGE RANGE
options of the ALTER PARTITION FUNCTION
command:
ALTER PARTITION FUNCTION partition_function_name(){ SPLIT RANGE ( boundary_value ) | MERGE RANGE ( boundary_value ) }
Adding a Table Partition
The SPLIT RANGE
option adds a new boundary point to an existing partition function and affects all objects that use ...
Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.