1、環境:
Oracle Rac 10.2.0.3 on Sun Solaris
2、問題:
@程式碼:
CREATE OR REPLACE PROCEDURE proc_system_time(Sys_date_timeOUT char) IS
BEGIN
Sys_date_time := TO_CHAR(SYSDATE,'yyyymmddhh24miss');
END;
/
@症狀:
cpu 升高
3、分析:
經由awr report檢查系統使用率,不論是memory的使用率,hard parse & hit ration都還不錯。
但在sql ordered by execution 中發現 執行的次數在2小時間,有1534萬次,實在高得離譜。
懷疑有無窮迴圈產生。
SQL ordered by Executions
- Total Executions: 16,500,018
- Captured SQL account for 95.5% of Total
Executions | Rows Processed | Rows per Exec | CPU per Exec (s) | Elap per Exec (s) | SQL Id | SQL Module | SQL Text |
---|---|---|---|---|---|---|---|
15,344,168 | 15,337,933 | 1.00 | 0.00 | 0.00 | 8u74nmyn35a6f | w3wp.exe | BEGIN proc_system_time... |
93,707 | 93,707 | 1.00 | 0.00 | 0.00 | ftj9uawt4wwzb | select condition from cdef$ wh... | |
75,927 | 75,927 | 1.00 | 0.00 | 0.00 | ckxd2nv9y5vyv | ACC.exe | Select count ( rowid ) From pa... |
70,812 | 70,497 | 1.00 | 0.00 | 0.00 | dq5p20xu978dn | ACC.exe | select inp_dec_rec_id from cha... |
20,048 | 344,080 | 17.16 | 0.00 | 0.00 | db78fxqxwxt7r | select /*+ rule */ bucket, en... | |
14,841 | 0 | 0.00 | 0.00 | 0.00 | b2gnxm5z6r51n | lock table sys.col_usage$ in e... | |
12,845 | 10,905 | 0.85 | 0.00 | 0.00 | 96g93hntrzjtr | select /*+ rule */ bucket_cnt,... | |
7,240 | 1,000 | 0.14 | 0.00 | 0.00 | 0h6b2sajwb74n | select privilege#, level from ... | |
7,159 | 7,242 | 1.01 | 0.00 | 0.00 | 0k8522rmdzg4k | select privilege# from sysauth... | |
6,428 | 6,413 | 1.00 | 0.00 | 0.00 | 3c1kubcdjnppq | update sys.col_usage$ set eq... |
4、解決:請使用者回去找開發人員,是否有異動程式。
沒有留言:
張貼留言