dba_free_space 显示的是有free 空间的tablespace ,如果一个tablespace 的free 空间不连续,那每段free空间都会在dba_free_space中存在一条记录。如果一个tablespace 有好几条记录,说明表空间存在碎片,当采用字典管理的表空间碎片超过500就需要对表空间进行碎片整理。

 


select a.tablespace_name ,count(1) 碎片量 from 

dba_free_space a, dba_tablespaces b 

where a.tablespace_name =b.tablespace_name

and b.extent_management = 'DICTIONARY'

group by a.tablespace_name

having count(1) >20

order by 2;



表空间碎片整理语法:

alter tablespace users coalesce;

相关文章:

  • 2021-11-19
  • 2021-08-10
  • 2021-07-26
  • 2021-11-19
  • 2021-11-19
  • 2021-11-19
  • 2022-03-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-01-11
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案