大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

分区表维护

背景:

10年积累的网站制作、成都网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计后付款的网站建设流程,更有徐汇免费网站建设让你可以放心的选择与我们合作。

SEND_CONTROL_HIS1分区表存在大量无用数据,虽不影响性能,但可以删除部分分区节省存储空间。

--查表空间有哪些对象

select owner,segment_name,segment_type,partition_name,bytes/1024/1024 As "占据空间M"

from dba_segments a where a.tablespace_name='PORT_DATA' And segment_name='CONTROL_HIS1'

Order By bytes Desc

实施步骤:

1、删除该表上半年分区

详见附表2:TRACK_PART19以前的数据分区可删除

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART4;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART5;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART6;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART7;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART8;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART9;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART10;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART11;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART12;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART13;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART14;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART15;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART16;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART17;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART18;

ALTER TABLE SEND_CONTROL_HIS1 DROP PARTITION TRACK_PART19;

2、清空该表6月份分区

详见附表2:TRACK_PART24以前的数据分区可TRUNCATE

ALTER TABLE SEND_CONTROL_HIS1 TRUNCATE PARTITION TRACK_PART20;

ALTER TABLE SEND_CONTROL_HIS1 TRUNCATE PARTITION TRACK_PART21;

ALTER TABLE SEND_CONTROL_HIS1 TRUNCATE PARTITION TRACK_PART22;

ALTER TABLE SEND_CONTROL_HIS1 TRUNCATE PARTITION TRACK_PART23;

ALTER TABLE SEND_CONTROL_HIS1 TRUNCATE PARTITION TRACK_PART24;


网站栏目:分区表维护
分享网址:http://dzwzjz.com/article/gecgpc.html
在线咨询
服务热线
服务热线:028-86922220
TOP