[Oracle] Enable Row Movement
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)
转载于:https://www.cnblogs.com/jefflu2012/archive/2012/09/12/2681026.html
[Oracle] Enable Row Movement相关推荐
- 深入解析:Row Movement 的原理和性能影响与关联
作者简介: 黄玮(Fuyuncat) 资深Oracle DBA,个人网站www.HelloDBA.com,致力于数据库底层技术的研究,其作品获得广大同行的高度评价. ROW MOVEMENT特性最初是 ...
- oracle 定时器时间分区_oracle分区表按时间自动创建
表分区是一种思想,分区表示一种技术实现.当表的大小过G的时候可以考虑进行表分区,提高查询效率,均衡IO.oracle分区表是oracle数据库提供的一种表分区的实现形式.表进行分区后,逻辑上仍然是一张 ...
- Oracle误删除数据的恢复方法
Oracle误删数据的恢复,分为两种方法:SCN和时间戳两种方法恢复. 一.通过SCN恢复删除且已提交的数据 1.获得当前数据库的SCN号 select current_scn from v$data ...
- Oracle误删除数据和表的恢复办法包括truncate
在工作中我们操作数据库的时候经常会发生一个不该发生的问题:用户意外的删除一个非常重要的表或者是表中的数据而且没有备份,需要尽快的恢复,以下就是解决的办法: 主要是利用Oracle回收站的闪回特性ora ...
- oracle恢复误删除记录
一:表的恢复 对误删的表,只要没有使用PURGE永久删除选项,那么从FLASHBACK TABLE区恢复回来希望是挺大的.一般步骤有: 1.从FLASHBACK TABLE里查询被删除的表 SELEC ...
- 恢复Oracle误删数据一点小记
今天同步两个表的数据,表存在自身关联关系.因没有发现被同步表已做修改(新增了若干条数据,这些数据间存在父子关系),导致这些新增的数据被删除了. 于是想以下方式恢复: alter table table ...
- Oracle学习笔记整理手册
文章目录 (1)Oracle正则匹配使用 (2)Oracle修改有数据的数据字段类型 (3)Oracle表数据回滚语句 (4)sql筛选出记录数大于2的记录 (5)oracle同义词 (6)oracl ...
- oracle的那些事
1.oracle视图操作 创建视图:create view 视图名称 as 查询数据; 删除视图:drop view 视图名称; 例: create view myview as select * f ...
- oracle数据误操作恢复【flashback闪回操作】
几张表的数据全部执行了delete * 操作. 接到问题立刻知道了事件的严重性,立即开始研究解决办法. 了解到数据库是oracle 10G. 经查询可以使用flashback闪回操作进行恢复,这下放心 ...
最新文章
- Kendo UI常用示例汇总(九)
- 《剑指offer》-逐层打印二叉树
- 区块链开发: 2019年及以后数字货币的前景如何?
- LeetCode LRU Cache(最近最少使用缓存)
- AWS re:Invent 2018的5大公告
- 提高程序员职场价值的10大技巧
- python OOP(2)
- bootstrap与jQuery结合的动态进度条
- php post不完整,如何在PHP中检查不完整的POST请求
- 视觉十四讲:第九讲_BA优化_g2o
- 上汽荣威E50 颇有想法的纯电动产品
- Q - Phalanx
- matlab课程设计语音,语音伪装课程设计代码,求助
- nvme分区选mbr还是guid_怎么分辨硬盘是GUID格式还是MBR格式以及怎样更改
- ESP-IDF遇到的关于环境变量的问题
- 每周一学EXCEL函数公式:EXCEL中数值转文本公式TEXT
- 计算机c语言二级题库及答案txt,计算机二级c语言题库及答案
- 黑苹果(OpenCore)踩坑之安装系统正常重启以后无法进入系统#[EB|WL] 0 0 0x01 0x0B 20 0x0E
- Tech Talk 活动预告|构建流式数据湖,让实时数据“水到渠成”
- 国内人脸识别发展到什么地步了?一文带你了解详情