当前位置:网站首页>Oracle cleans up the Database disk space of tables with referenced partitions
Oracle cleans up the Database disk space of tables with referenced partitions
2022-07-27 07:28:00 【hawanglc】
A database system is more fancy , Because the amount of data is too large , Create tablespaces and data files by day , The daily data is placed in different table spaces , In order to ensure the integrity of the data , Tables are associated by foreign keys , meanwhile , Tables are partitioned by referencing partitions . Now? , You need to clean up the historical data files of these tables .
Clean up the Database disk space of the table containing the referenced partition
Table cleanup referencing partitions
The reference partition is first a table A There are primary keys a1, Another table B The foreign key for is A.a1. If A Table is a partitioned table , that B Depending on the table A Partition the table .
When deleting , Just delete A One of the partitions of the table , that B The partition data corresponding to the table will also be cleaned up automatically .
Query the partition type view of the table
select * from all_part_tables;
View of all constraints of the query table : It defines foreign keys and primary keys
select * from all_contraints;
Through the association of the above two tables , To query those tables that reference partitions and their corresponding primary tables .
Delete the table partition of a table
alter table table_name drop partition part_name update global indexes;
Delete a table space to clean up disk space
drop tablespace tablespace_name including contents and datafiles
边栏推荐
猜你喜欢

整体二分?

在kettle中快速更新一个字段中的信息

(2022 Hangdian multi school III) 1009.package delivery (greedy)

在kettle使用循环来处理表中的数据

jjwt 生成token

软件测试十大必问面试题(附答案和解析)

Chapter 6 Shell Logic and Arithmetic

vlan间路由(讲解+验证)

The possibility of metauniverse from the perspective of technical principles: how Omniverse "built" Mars

Quartus: an error is reported when adding a.V file to someone else's project
随机推荐
docker安装MySQL8.0.28
Zabbix: 将收集到值映射为易读的语句
Basic functions and collections of guava
C语言实现猜数字小游戏项目实战(基于srand函数、rand函数,Switch语句、while循环、if条件判据等)
Usage of string class
使用pip命令切换不同的镜像源
Word wrap: break word line feed is compatible with browsers
oracle清理含有引用分区的表的数据库磁盘空间
Guava的基础功能与集合
2022-07-25 Gu Yujia's study notes
Use reflection to dynamically modify annotation attributes of @excel
Use shell to calculate the sum of numbers in text
flink cdc 抽取oracle的数据,会不断的占用oracle的内存吗,最后引发ora-040
ClickHouse 笔记1 | 简介、特点 | 基于CentOS7系统的安装与使用 | 常用数据类型 | MergeTree 表引擎 | SQL操作
网络入门——vlan及trunk概述
Single arm routing (explanation + experiment)
js做一个红绿灯
Please ask the big guys a question. The pgsqlcdc task can't monitor changes after running for a period of time. Just restart it. What should I do
C language pthread_ cleanup_ Push() and pthread_ cleanup_ Pop() function (used for the resource cleaning task after the termination action in the critical resource program segment to avoid deadlock. T
Firefox browser, when accessing Tencent cloud server, failed to establish a secure connection.