甲骨文回收高水位线

  select 轮((1-a.used/b.num_total) * 100, 0),%得到
  (SELECT COUNT(不同SUBSTR (rowid 1 15))使用从表名),
  (从dba_tables选择块num_total table_name='表名”和wn='用户名”)b;
  
  
  通过dba_tables里的字块段和有数据的字段做对比,在用1减,求出没有数据的块的百分比(一般超过20%就需要回收了),从而判定是否需要回收高水位线
  
  
  完成;alter table test_shrik使行运动;
  完成;alter table test_shrik缩小空间;
  完成;选择t。块,table_name EMPTY_BLOCKS, NUM_ROWS
  ,从user_tables t
  table_name=上(“test_shrik”);
  
  
  exec dbms_stats.gather_table_stats (“sys”,“test_shrik”);
  
  
  完成;选择t。块,table_name EMPTY_BLOCKS, NUM_ROWS
  ,从user_tables t
  table_name=上(“test_shrik”);
  
  
  高水位线已经下降了

甲骨文回收高水位线