(Day 52) Partition table conversion CTAS

introduce

CTAS refers to using create table as select to create a new partition table based on the original table structure.

  • Advantages: The operation is simple and controllable. CTAS uses DDL, which does not generate UNDO and only generates a small amount of REDO. The efficiency is relatively high, and after the table creation is completed, the data is already distributed to various partitions;
  • Disadvantages: The table cannot be accessed during CTAS and RENAME, and the operation needs to be stopped. The table structure and table data need to be sorted out. After conversion, a large number of comparisons are required, and the preparation work is relatively complicated;

This article mainly explains how to use CTAS to convert partition tables.

Environmental preparation

CPU name IP address Database version user table space Table Name partition column Partition duration
lucifer 10.211.55.200 19C about par_tbs lucifer by_date 2 years

Test environment use OracleShellInstall one-click installation script Installation:

## 主
./OracleShellInstall -lf enp0s5 

Guess you like

Origin blog.csdn.net/m0_50546016/article/details/134958737