服务器 频道

Oracle高水位标志的概念

  【IT168 服务器学院】 可以用以下几点对high-water mark进行理解
  1.指一个表中曾经被用过的最后一个块
  2.如果有数据被插入表,high-water mark 就移到到被使用的最后一个块
  3.如果有数据被删除,high-water mark的位置不会变
  4.high-water mark被储存在表的段头(segment header of the table)
  5.当对表执行全表扫描时,oracle server 被所有的块直到high-water mark
  
  另外我的理解如下,
  1 如果为表分配了大量的extents , 但这些extent 还没使用可以手工收回。并且有如下两种情况
  第一种 minextent <hwm可以使用
  alter table tablename deallocate unused;
  将hwm以上所有没使用的空间释放
  第二种 minextent >hwm 则释放minextents 以上的空间。
  如果要释放hwm以上的空间则使用keep 0。
  alter table tablesname deallocate unused keep 0;
  2 truncate table命令可以将minextent 之上的空间完全释放。
  3 只是将hwm移动,释放的空间不会被其他段使用--    
0
相关文章