12C新功能:在线移动分区 (Doc ID 1584032.1)

Posted zylong-sys

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了12C新功能:在线移动分区 (Doc ID 1584032.1)相关的知识,希望对你有一定的参考价值。

12C New Feature: Online Move Partition (Doc ID 1584032.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

PURPOSE

 To be able to MOVE a Partition online. 为了能够在线移动分区

DETAILS

DML are allowed during Online Move Partition. ALTER TABLE MOVE PARTITION becomes non-blocking online DDL. Global indexes and local indexed are maintained during the move partition, so a manual index rebuild is no longer required. The online partitioning movement removes the read-only state for the actual MOVE PARTITION command.

在线移动分区期间允许使用DML。ALTER TABLE MOVE PARTITION 变为非阻塞在线DDL。全局索引和局部索引在移动分区期间得以维护,因此不再需要手动重建索引。联机分区移动将删除实际MOVE PARTITION命令的只读状态。

Following is an example for the same:  以下是相同的示例:

SQL> CREATE TABLE test1 (product NUMBER(16) PRIMARY KEY,customer VARCHAR2(4000),time_id DATE)
PARTITION BY RANGE (time_id)
(PARTITION test1_PART1 VALUES LESS THAN (TO_DATE(‘01-JUL-2013‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART2 VALUES LESS THAN (TO_DATE(‘01-AUG-2013‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART3 VALUES LESS THAN (TO_DATE(‘01-SEP-2013‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART4 VALUES LESS THAN (TO_DATE(‘01-OCT-2013‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART5 VALUES LESS THAN (TO_DATE(‘01-NOV-2013‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART6 VALUES LESS THAN (TO_DATE(‘01-DEC-2013‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART7 VALUES LESS THAN (TO_DATE(‘01-JAN-2014‘,‘DD-MON-YYYY‘)),
PARTITION test1_PART_MAX VALUES LESS THAN (MAXVALUE));

Table created

SQL> CREATE TABLE test2( product NUMBER(6) PRIMARY KEY,customer VARCHAR2(4000), time_id DATE)
PARTITION BY RANGE (time_id)
(PARTITION test1_PART1 VALUES LESS THAN (TO_DATE(‘01-JUL-2013‘,‘DD-MON-YYYY‘)));

Table created

SQL> CREATE TABLE test3( product NUMBER(6) PRIMARY KEY, customer VARCHAR2(4000),time_id DATE)
PARTITION BY SYSTEM
( PARTITION test3_PART1,
PARTITION test3_PART2,
PARTITION test3_PART3,
PARTITION test3_PART_MAX);

Table created

ONLINE Move Partition example

SQL> ALTER TABLE test1 MOVE PARTITION test1_PART1 ONLINE;

Table altered

SQL> ALTER TABLE test1 MOVE PARTITION test1_PART1 ONLINE UPDATE INDEXES;

Table altered

SQL> ALTER TABLE test1 MOVE PARTITION test1_PART1 ONLINE UPDATE GLOBAL INDEXES;

Table altered

Restrictions:  限制
- Online on IOT is not supported.

Note: Index maintenance during online move occurs as long as the UPDATE INDEXES or UPDATE GLOBAL INDEXES clause is used. These clauses exist for the non online move statement as well. So, there is no difference in this respect between online and non online move in this regard.
注意:只要使用UPDATE INDEXES或UPDATE GLOBAL INDEXES子句,就会在联机移动期间进行索引维护。这些条款也适用于非在线移动语句。因此,在线移动和非在线移动在这方面没有区别。

以上是关于12C新功能:在线移动分区 (Doc ID 1584032.1)的主要内容,如果未能解决你的问题,请参考以下文章

如何在Oracle 12C中添加多个分区 (Doc ID 1482456.1)

12c分区增强功能,新功能(文档ID 1568010.1)

RMAN RECOVER TABLE 功能是 Oracle Database 12c 的新增功能 (Doc ID 1521524.1)

Data Guard:Oracle 12c –新增和更新的功能 (Doc ID 1558256.1)

[20181031]12c 在线移动数据文件.txt

Oracle12c中性能优化&功能增强新特性之全局索引DROP和TRUNCATE 分区的异步维护