temp 表空间引发的等待及相关知识

 

东南亚印尼 ,系统在下5月1号13 点左右变的非常慢

出awr 报告

 

 Snap IdSnap TimeSessionsCursors/Session
Begin Snap:510701-May-13 13:00:02131      1.0
End Snap:510801-May-13 14:00:04138       .9
Elapsed:               60.04 (mins)  
DB Time:              898.90 (mins)  

 

系统比平时高出了很多

Top 5 Timed Foreground Events

 

EventWaitsTime(s)Avg wait (ms)% DB timeWait Class
DB CPU 24,951 46.26 
enq: TS - contention3,98018,991477235.21Other
db file sequential read1,651,2177,166413.29User I/O
log file sync430,82047310.88Commit
gc current block busy22,970277120.51Cluster

 

enq:ts- contention wait event temp tablespace 不足引发的等待事件

temp tablespace 真的不够了吗, 查看alter.log

Stopping background process CJQ0
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP

果然temp 报不足了,不能正确扩展了

 

查看

select file#, blocks*8/1024/1024 from v$tempfile;

 

FILE#
 
BLOCKS*8/1024/1024
 
1
 
31.99902344
 
2
 
2
 
3
 
2
 
4
 
2
 
5
 
2
 
6
 
2
 
7
 
2
 
8
 
2
 
9
 
2
 
10
 
2
 
11
 
2

 

temp tablespace 空间数据文件多达11个,但10个只有2G ,本系统是一个olap的系统的应用特性,又是三节点的rac

对temp tablespace 使用的比较大, 是不是另外10 个数据文件不能扩展呢,先解燃眉之急。

 

select * from  dba_temp_files ;

 原来的后面10个临时表空间不能扩展

alter database  tempfile 2 autoextend on ;

alter database  tempfile 3 autoextend on ;

一会观察wait event  enq:ts- contention 消失。

问题解决。

借着这个机会,学习一下temp 空间的相关知识。

 temp tablespace 相关的视图

dba_temp_files v$tempfiles 这两个视图记录temp 表空间的基本信息,大小,可扩展,文件的位置

 v$sort_segment   temp tablespace 的使用情况, 临时表,排序段

 v$tempseg_usage 显示那些用户在使用临时空间,使用了多少,其session的id,SQL的ID等

 dba_temp_free_space   记录空间大小、空闲、 使用的大小情况

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值