- 最后登录
- 2016-4-27
- 在线时间
- 84 小时
- 威望
- 87
- 金钱
- 846
- 注册时间
- 2012-2-22
- 阅读权限
- 50
- 帖子
- 101
- 精华
- 1
- 积分
- 87
- UID
- 253
|
1#
发表于 2013-11-18 16:40:57
|
查看: 6941 |
回复: 8
本帖最后由 anbob 于 2013-11-22 09:22 编辑
有个库版本11204,发现很严重的parse问题- Load Profile
- Per Second Per Transaction Per Exec Per Call
- DB Time(s): 0.7 0.0 0.00 0.00
- DB CPU(s): 0.4 0.0 0.00 0.00
- Redo size (bytes): 469,220.8 1,272.4
- Logical read (blocks): 5,820.7 15.8
- Block changes: 3,166.9 8.6
- Physical read (blocks): 0.0 0.0
- Physical write (blocks): 27.1 0.1
- Read IO requests: 0.0 0.0
- Write IO requests: 5.3 0.0
- Read IO (MB): 0.0 0.0
- Write IO (MB): 0.2 0.0
- User calls: 2,131.7 5.8
- Parses (SQL): 841.7 2.3
- Hard parses (SQL): 0.0 0.0
- SQL Work Area (MB): 0.2 0.0
- Logons: 0.6 0.0
- Executes (SQL): 1,207.4 3.3
- Rollbacks: 0.0 0.0
- Transactions: 368.8
- Instance Efficiency Percentages (Target 100%)
- Buffer Nowait %: 100.00 Redo NoWait %: 100.00
- Buffer Hit %: 100.00 In-memory Sort %: 100.00
- Library Hit %: 100.25 Soft Parse %: 99.99
- Execute to Parse %: 30.28 Latch Hit %: 99.85
- Parse CPU to Parse Elapsd %: 14.60 % Non-Parse CPU: 98.95
- Top 10 Foreground Events by Total Wait Time
- Event Waits Total Wait Time (sec) Wait Avg(ms) % DB time Wait Class
- log file sync 1,180,970 1630.1 1 67.8 Commit
- DB CPU 1239.6 51.5
- library cache: mutex X 8,437 125.1 15 5.2 Concurrency
- latch: shared pool 713 45.9 64 1.9 Concurrency
- SQL*Net message to client 4,597,267 13.9 0 .6 Network
- latch: enqueue hash chains 188 3.1 17 .1 Other
- cursor: pin S 693 2.9 4 .1 Concurrency
- latch free 144 1.6 11 .1 Other
- cursor: pin S wait on X 20 .2 12 .0 Concurrency
- cursor: mutex S 2 .2 114 .0 Concurrency
复制代码 后来做了个测试,怀疑11204 没用 softer soft parse ,session_cached_cursor不为0- --####################### 11203
- sys@ANBOB>alter system flush shared_pool;
- System altered.
- sys@ANBOB>select LOADED_VERSIONS ,OPEN_VERSIONS ,EXECUTIONS,LOADS,PARSE_CALLS from v$sql where sql_text like 'select /*weejar11203*/%';
- no rows selected
- sys@ANBOB>conn weejar/weejar
- Connected.
- weejar@ANBOB>select /*anbob11203*/ count(*) from test;
- COUNT(*)
- --------------------
- 1
- -- 执行同样sql 5次
- weejar@ANBOB>select LOADED_VERSIONS ,OPEN_VERSIONS ,EXECUTIONS,LOADS,PARSE_CALLS from v$sql where sql_text like 'select /*anbob11203*/%';
- LOADED_VERSIONS OPEN_VERSIONS EXECUTIONS LOADS PARSE_CALLS
- -------------------- -------------------- -------------------- -------------------- --------------------
- 1 1 5 1 3
- weejar@ANBOB>show parameter session_cached
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- session_cached_cursors integer 50
- weejar@ANBOB>select * from v$version;
- BANNER
- --------------------------------------------------------------------------------
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- PL/SQL Release 11.2.0.3.0 - Production
- CORE 11.2.0.3.0 Production
- TNS for Linux: Version 11.2.0.3.0 - Production
- NLSRTL Version 11.2.0.3.0 - Production
- ############ 11204
- sys@ORA11204>conn weejar;
- Enter password:
- Connected.
- weejar@ORA11204>select LOADED_VERSIONS ,OPEN_VERSIONS ,EXECUTIONS,LOADS,PARSE_CALLS from v$sql where sql_text like 'select /*anbob11204*/%';
- no rows selected
- weejar@ORA11204>select /*anbob11204*/ count(*) from test1;
- COUNT(*)
- --------------------
- 0
- -- 同样执行5次
- weejar@ORA11204>select LOADED_VERSIONS ,OPEN_VERSIONS ,EXECUTIONS,LOADS,PARSE_CALLS from v$sql where sql_text like 'select /*anbob11204*/%';
- LOADED_VERSIONS OPEN_VERSIONS EXECUTIONS LOADS PARSE_CALLS
- -------------------- -------------------- -------------------- -------------------- --------------------
- 1 1 5 1 5
- sys@ORA11204>show parameter session_cache
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- session_cached_cursors integer 50
- sys@ORA11204>select * from v$version;
- BANNER
- --------------------------------------------------------------------------------
- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
- PL/SQL Release 11.2.0.4.0 - Production
- CORE 11.2.0.4.0 Production
- TNS for Linux: Version 11.2.0.4.0 - Production
- NLSRTL Version 11.2.0.4.0 - Production
复制代码 问题:
11204 解析有问题还是v$sql.parse_calls显示有问题,有人知道么?
thanks. |
|