2016-07-22 82 views

回答

1

我会找出这些问题通过以下步骤:

1)找出哪些表在表空间中最大的一个。通常这些表导致您正在搜索的问题。您可以通过以下语句找到这些表格:

select owner, 
    segment_name, 
    segment_type, 
    tablespace_name, 
    sum(bytes)/1024/1024 "SIZE (MB)" 
    from dba_segments 
where tablespace_name = "Your Tablespace" 
group by owner, segment_name, segment_type, tablespace_name 
order by 5 desc; 

2)现在您已了解有关最大表格的信息。你可以现在检查他们在上一次增长的速度有多快。例如,你可以使用优化器历史记录检查表增长与下面的语句:

select u.name, o.name, savtime, h.rowcnt 
    from sys.user$ u, sys.obj$ o, sys.wri$_optstat_tab_history h 
where h.obj# = o.obj# 
    and o.owner# = u.user# 
    and u.name = "Your Table/Index Owner" 
    and o.name = "Your Table/Index Name" 
order by savtime; 

现在轮到你来检查它是否是正常的,这些表的增长那么多。 如果使用这些步骤找不到问题,则表空间中还可能存在其他问题。检查表格Fragemtation的Oracle文档。也许这个链接也可以帮助你:https://docs.oracle.com/cd/B28359_01/server.111/b28310/schema003.htm