ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查看每个tablespace的free space

查看每个tablespace的free space

原创 Linux操作系统 作者:season0891 时间:2010-05-20 15:55:54 0 删除 编辑
看每个tablespace的free space(extents)

SELECT tablespace_name "TABLESPACE",
file_id,
COUNT(*) "PIECES",
MAX(blocks) "MAXIMUM",
MIN(blocks) "MINIMUM",
AVG(blocks) "AVERAGE",
SUM(blocks) "TOTAL"
FROM sys.dba_free_space GROUP BY tablespace_name, file_id;

PS:TOTAL shows the amount of free space in each tablespace, PIECES shows the amount of fragmentation in the datafiles of the tablespace, and MAXIMUM shows the largest contiguous area of space. This query is useful when you are going to create a new object or you know that a segment is about to extend, and you want to make sure that there is enough space in the containing tablespace.



经常查看空间大小是每个DBA每天应该做的事情,当发现异常情况后,应该马上增加DATA FILES或扩展DATA FILES的大小。

come from:http://www.jiafangyifang.com/news/newsdata/2001_07_23/4/2001072391852.htm

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/90618/viewspace-663218/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-06-10

  • 博文量
    790
  • 访问量
    2098085