各个Oracle 版本下如何调整高水位(HWM)

以下没有注明版本号的各版本都适用。

1.CTAS :

create table xxx_new

tablespace new_tablespace_name

storage (initial new_initial next new_next freelists new_freelist_number )

as

select * from xxx

order by primary_index_key_values;

Running CTAS in parallel can dramatically speed up table reorganization

create table vbap_sorted

tablespace vbap_copy

storage (initial 500m

next 50m

maxextents unlimited

)

parallel (degree 4)

as

select *

from

sapr3.vbap

order by

mandt,

vbeln,

posnr;

Using Oracle dbms_redefinition: The dbms_redefinition package allows you to copy a table (using CTAS), create a snapshot on the table, enqueue changes during the redefinition, and then re-synchronize the restructured table with the changes that have accumulated during reorganization.

exec dbms_redefinition.abort_redef_table('PUBS','TITLES','TITLES2');

alter table titles add constraint pk_titles primary key (title_id);

exec dbms_redefinition.can_redef_table('PUBS','TITLES');

create table titles2

as

select * from titles;

exec dbms_redefinition.start_redef_table('PUBS','TITLES','TITLES2','title_id title_id,title

title,type type,pub_id pub_id,price price,advance advance,royalty*1.1 royalty,ytd_sales

ytd_sales,notes notes,pubdate pubdate');

exec dbms_redefinition.sync_interim_table('PUBS','TITLES','TITLES2');

exec dbms_redefinition.finish_redef_table('PUBS','TITLES','TITLES2');If your reorganization fails, you must take special steps to make it re-start. Because the

redefinition requires creating a snapshot, you must call dbms_redefinition.abort_redef_table to

release the snapshot to re-start you procedure.

The ‘dbms_redefinition.abort_redef_table’ procedure which accepts 3 parameters (schema, original table name, holding table name), and which “pops the stack” and allows you to start over.

2.EXP/IMP

太简单,这个就不用说了,哪个版本都适用。

3.TABLE MOVE(9I)

alter table table_name move ...

aleter table move只是给表中所有数据搬到新的存储空间上,就相当于把A房间内乱七八糟的东西整理起来放到B房间里面然后再把A房间让出来给别人,这样你不但让出了整个A房间而且仍然只占用一个房间,但是你的东西(数据)也整齐了可能只占用B房间很少的一部分也在同一表空间move——效果很好必须重建索引,可以直接在本tbs上.eg: alter table table_name move;需要对index rebuild;

4.SHRINK SPACE(10G)

alter table enable row movement;alter table shrink space;

oracle hwm调整语法,各个Oracle 版本下如何调整高水位(HWM)相关推荐

  1. oracle delete block,Oracle delete和truncate对高水位(HWM)的影响详细解析

    在讨论高水位之前需要明确一下oracle的逻辑存储的概念:Block.extent.segment.tablespace block:块的概念,他是oracle最小的一个存储单元,一般为8K,也是一次 ...

  2. 数据表 高水位 mysql_Oracle中的高水位(HWM)

    Linux公社(www.linuxidc.com)是专业的Linux系统门户网站,实时发布最新Linux资讯,包括Linux.Ubuntu.Fedora.RedHat.红旗Linux.Linux教程. ...

  3. 高水位(HWM)详解

    什么是高水位线? 所有的oracle段(segments,在此,为了理解方便,建议把segment作为表的一个同义词) 都有一个在段内容纳数据的上限,我们把这个上限称为"high water ...

  4. mysql 回收高水位_Oracle 高水位(HWM)回收原理及操作方法

    一.  高水位(HWM)及其产生原因 High Water Mark,HWM) 是Oracle(Segment)级别的概念.在仅有DML(比如delete,insert)操作时,高水位线只会增长,不会 ...

  5. oracle hwm的位置,Oracle 高水位(HWM)教程(2)

    4. 用逻辑导入导出: Emp/Imp 5. Alter table table_name deallocate unused 注:这证明,DEALLOCATE UNUSED为释放HWM上面的未使用空 ...

  6. Oracle 高水位(HWM: High Water Mark) 说明

    一. 准备知识:ORACLE的逻辑存储管理.        ORACLE在逻辑存储上分4个粒度: 表空间, 段, 区 和 块.        1.1 块: 是粒度最小的存储单位,现在标准的块大小是8K ...

  7. ORACLE 高水位(HWM)

    在9I中: (1)如果MINEXTENT 可以使ALTER TABLE TABLENAME DEALLOCATE UNUSED将HWM以上所有没使用的空间释放 (2)如果MINEXTENT >H ...

  8. oracle hwm调整语法,Oracle 10g HWM原理及性能优化

    摘  要: HWM(High Water Mark)是表中已经使用过的存储空间与未使用过的存储空间之间的分界线,HWM对全表扫描的性能有非常大的影响.当全表扫描时,Oracle会读取HWM下所有的块, ...

  9. oracle的高水位和低水位实验,Oracle 高水位问题

    Oracle 对数据段的管理有一个高水位(HWM, High Water Mark)的概念.高水位是数据段中使用过和未使用过的数据块的分界线.高水位以下的数据块是曾使用过的,以上的是从未被使用或初始化 ...

最新文章

  1. QIIME 2教程. 12数据筛选Filtering data(2021.2)
  2. 初探JavaScript魅力1
  3. iOS开发- OpenGL ES屏幕截图
  4. Android防止按钮连续点击
  5. MNE-Python : TypeError: today() takes no keyword arguments
  6. C++派生类构造函数调用规则
  7. php文件安全实现方法,php安全下载大文件的实现代码
  8. Gridview行随鼠标变色
  9. RocketMQ核心架构和概
  10. 【解析】在设计软件的模块结构时,()不能改进设计质量
  11. input发送a.jax_Java EE 7 / JAX-RS 2.0 – REST上的CORS
  12. bootstrap 黑边框表格样式_Excel表格如何添加绘制边框?
  13. 版本管理器subversion的简单配置以及和apache的结合使用
  14. Excel文件处理实战-Python编程进阶
  15. kafka源码_Kafka日志段源码解析
  16. BZOJ5262(容斥)
  17. 展视互动签约新华网 创在线教育新蓝图
  18. 【源码】二进制非洲秃鹫优化算法
  19. Merriam-Webster‘s Vocabular Builder ( BELL )
  20. 【文本分析】基于粤港澳大湾区博物馆访客评价的文本分析

热门文章

  1. 别跟混蛋叫劲儿--金融风暴、老板已逃(下)——网上答疑(25-2)
  2. 基于fastble的蓝牙开发
  3. 放下手机好好过年html,看完这篇让你放下手机,想立刻回家和家人好好过年!...
  4. 取石子游戏系列(1)
  5. 量子计算遇见深度学习(下篇)
  6. nyoj 61 传纸条(一)双线程DP
  7. Leeds Sports Pose(LSP)数据集
  8. 计算金球铁球体积c语言,网球金球制规则
  9. linux驱动之设备模型
  10. Activity生命周期学习总结2