系统突然变慢,用topas发现几十个oracle进程瓜分了所有CPU资源。跟踪session正在处理的SQL发现都是一些查询统计语句,平时也会有这么多查询的,但今天却出问题了。分析了几条SQL,有些计划比较理想,但有些明显没有进行过优化的。
系统是AIX4.3+oracle9.2.0.4
查询等待行出下面的
SQL> select sid,event from v$session_wait;
SID EVENT
---------- ----------------------------------------------------------------
15 latch free
21 latch free
29 latch free
44 latch free
50 latch free
49 latch free
46 latch free
33 latch free
57 latch free
97 latch free
95 latch free
SID EVENT
---------- ----------------------------------------------------------------
91 latch free
88 latch free
87 latch free
72 latch free
68 latch free
60 latch free
59 latch free
154 latch free
151 latch free
143 latch free
132 latch free
SID EVENT
---------- ----------------------------------------------------------------
129 latch free
120 latch free
116 latch free
112 latch free
108 latch free
106 latch free
99 latch free
98 latch free
1 pmon timer
2 rdbms ipc message
3 rdbms ipc message
SID EVENT
---------- ----------------------------------------------------------------
4 rdbms ipc message
5 rdbms ipc message
10 rdbms ipc message
12 rdbms ipc message
13 rdbms ipc message
9 rdbms ipc message
6 rdbms ipc message
7 rdbms ipc message
8 smon timer
86 SQL*Net message to client
14 SQL*Net message from client
SID EVENT
---------- ----------------------------------------------------------------
36 SQL*Net message from client
41 SQL*Net message from client
55 SQL*Net message from client
126 SQL*Net message from client
125 SQL*Net message from client
110 SQL*Net message from client
109 SQL*Net message from client
102 SQL*Net message from client
101 SQL*Net message from client
92 SQL*Net message from client
89 SQL*Net message from client
SID EVENT
---------- ----------------------------------------------------------------
77 SQL*Net message from client
162 SQL*Net message from client
161 SQL*Net message from client
159 SQL*Net message from client
156 SQL*Net message from client
148 SQL*Net message from client
146 SQL*Net message from client
127 SQL*Net message from client
48 SQL*Net message from client
40 SQL*Net message from client
35 SQL*Net message from client
SID EVENT
---------- ----------------------------------------------------------------
20 SQL*Net message from client
26 SQL*Net message from client
27 SQL*Net message from client
11 wakeup time manager
70 rows selected.