Enable Row Movement.

I’m trying to share one of my past experience with “row movement” in my early career days…

An Application deleted about 80 million rows (approx)  in a table where the table had just above 87 million rows. This was a routine activity for them at their business EOD.And they saw performance hiss for their reporting app which used to hit this table until their next business day begins and similar count of data gets populated.

Technically, this lead to many number of partial empty blocks below the HWM. And large amount of I/O was definite as it has to scan through the all the blocks pertaining to table until it reaches the HWM.

Shrinking the data  possible ?? Yes it is. In Oracle 9i version, we had to export and import the table back…. while 10g and over we have a amazing concept of doing this online   in just 3 steps. Enable the row movement on the table, shrink space cascade and followed by disabling the row movement.

  • Alter table  <tab_name>  enable row movement;
  • Alter table  <tab_name> shrink space cascade;
  • Alter table  <tab_name>  disable row movement;

The pre-req’s for this activity would be the table should be in an  ASSM tablespace.

Let us try to understand what actually happens when the above operation is performed.

Oracle in background does deletes and inserts followed by filling up the empty spaces with the existing rows.Yes, this is bound to generate lots of redo and undo & significantly consumes lots of processing power. Also, the row id’s would change as the data is moved from bottom to the table to the top the table. So if there are any triggers on row id’s of the table … its time to be cautious

Benefits:

  • Less i/o overhead
  • Efficient FTS (As the HWM is come down)
  • Better Index range scans (as the data is less spread and HWM has come down)
It’s better practice to run the utlrp.sql once the shrink operation is completed.(This is due to the dependent objects on the table getting  invalid and since 11.2.0.3 there is an enhancement made, i.e… to get the dependent objects in a  valid state.

转载于:https://www.cnblogs.com/jefflu2012/archive/2012/09/12/2681026.html

[Oracle] Enable Row Movement相关推荐

  1. 深入解析:Row Movement 的原理和性能影响与关联

    作者简介: 黄玮(Fuyuncat) 资深Oracle DBA,个人网站www.HelloDBA.com,致力于数据库底层技术的研究,其作品获得广大同行的高度评价. ROW MOVEMENT特性最初是 ...

  2. oracle 定时器时间分区_oracle分区表按时间自动创建

    表分区是一种思想,分区表示一种技术实现.当表的大小过G的时候可以考虑进行表分区,提高查询效率,均衡IO.oracle分区表是oracle数据库提供的一种表分区的实现形式.表进行分区后,逻辑上仍然是一张 ...

  3. Oracle误删除数据的恢复方法

    Oracle误删数据的恢复,分为两种方法:SCN和时间戳两种方法恢复. 一.通过SCN恢复删除且已提交的数据 1.获得当前数据库的SCN号 select current_scn from v$data ...

  4. Oracle误删除数据和表的恢复办法包括truncate

    在工作中我们操作数据库的时候经常会发生一个不该发生的问题:用户意外的删除一个非常重要的表或者是表中的数据而且没有备份,需要尽快的恢复,以下就是解决的办法: 主要是利用Oracle回收站的闪回特性ora ...

  5. oracle恢复误删除记录

    一:表的恢复 对误删的表,只要没有使用PURGE永久删除选项,那么从FLASHBACK TABLE区恢复回来希望是挺大的.一般步骤有: 1.从FLASHBACK TABLE里查询被删除的表 SELEC ...

  6. 恢复Oracle误删数据一点小记

    今天同步两个表的数据,表存在自身关联关系.因没有发现被同步表已做修改(新增了若干条数据,这些数据间存在父子关系),导致这些新增的数据被删除了. 于是想以下方式恢复: alter table table ...

  7. Oracle学习笔记整理手册

    文章目录 (1)Oracle正则匹配使用 (2)Oracle修改有数据的数据字段类型 (3)Oracle表数据回滚语句 (4)sql筛选出记录数大于2的记录 (5)oracle同义词 (6)oracl ...

  8. oracle的那些事

    1.oracle视图操作 创建视图:create view 视图名称 as 查询数据; 删除视图:drop view 视图名称; 例: create view myview as select * f ...

  9. oracle数据误操作恢复【flashback闪回操作】

    几张表的数据全部执行了delete * 操作. 接到问题立刻知道了事件的严重性,立即开始研究解决办法. 了解到数据库是oracle 10G. 经查询可以使用flashback闪回操作进行恢复,这下放心 ...

最新文章

  1. Kendo UI常用示例汇总(九)
  2. 《剑指offer》-逐层打印二叉树
  3. 区块链开发: 2019年及以后数字货币的前景如何?
  4. LeetCode LRU Cache(最近最少使用缓存)
  5. AWS re:Invent 2018的5大公告
  6. 提高程序员职场价值的10大技巧
  7. python OOP(2)
  8. bootstrap与jQuery结合的动态进度条
  9. php post不完整,如何在PHP中检查不完整的POST请求
  10. 视觉十四讲:第九讲_BA优化_g2o
  11. 上汽荣威E50 颇有想法的纯电动产品
  12. Q - Phalanx
  13. matlab课程设计语音,语音伪装课程设计代码,求助
  14. nvme分区选mbr还是guid_怎么分辨硬盘是GUID格式还是MBR格式以及怎样更改
  15. ESP-IDF遇到的关于环境变量的问题
  16. 每周一学EXCEL函数公式:EXCEL中数值转文本公式TEXT
  17. 计算机c语言二级题库及答案txt,计算机二级c语言题库及答案
  18. 黑苹果(OpenCore)踩坑之安装系统正常重启以后无法进入系统#[EB|WL] 0 0 0x01 0x0B 20 0x0E
  19. Tech Talk 活动预告|构建流式数据湖,让实时数据“水到渠成”
  20. 国内人脸识别发展到什么地步了?一文带你了解详情

热门文章

  1. android进程间对象传递,Android Fragment 间对象传递
  2. iptables详解(1):iptables概念
  3. 《剑指offer》求1+2+3+...n(不用if、else、乘除等)
  4. js中的generator
  5. Redis 是单线程凭什么能支撑高并发
  6. 使用Spring特性优雅书写业务代码
  7. Hive自定义UDF UDAF UDTF
  8. hbase命令行演示
  9. 互联网广告系统综述四定向
  10. AMD cpu 下 Pytorch 多卡并行卡死问题解决