- 最后登录
- 2014-4-9
- 在线时间
- 95 小时
- 威望
- 0
- 金钱
- 268
- 注册时间
- 2012-6-24
- 阅读权限
- 10
- 帖子
- 78
- 精华
- 0
- 积分
- 0
- UID
- 528
|
8#
发表于 2013-9-14 07:46:35
Maclean Liu(刘相兵 发表于 2013-9-13 10:02
select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BI ...
通过这个查询可以找到不通的绑定变量值了,后续可以继续排查了。- SQL> select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BINDS'));
- Enter value for sql_id: fupxm9u05g2vq
- old 1: select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BINDS'))
- new 1: select plan_table_output from table (dbms_xplan.display_awr('fupxm9u05g2vq',null,null,'ADVANCED +PEEKED_BINDS'))
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- SQL_ID fupxm9u05g2vq
- --------------------
- select t.image_path as imagePath from j_org_image t where t
- .prov_region_code = :1
- and t.image_type = 3 and exists (select 1 from
- j_organization j
- where j.prov_region_code = :2 and j.deal_status = '1'
- and
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- j.haobai_cust_id = :3 and j.org_serial_id = t.org_serial_id)
- and rownum = 1
- Plan hash value: 601600015
- --------------------------------------------------------------------------------
- -----------------------------------------
- | Id | Operation | Name | Rows | Bytes
- | Cost (%CPU)| Time | Pstart| Pstop |
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- -----------------------------------------
- | 0 | SELECT STATEMENT | | |
- | 7 (100)| | | |
- | 1 | COUNT STOPKEY | | |
- | | | | |
- | 2 | NESTED LOOPS SEMI | | 1 | 84
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- | 7 (0)| 00:00:01 | | |
- | 3 | PARTITION LIST SINGLE | | 1 | 56
- | 5 (0)| 00:00:01 | KEY | KEY |
- | 4 | TABLE ACCESS FULL | J_ORG_IMAGE | 1 | 56
- | 5 (0)| 00:00:01 | KEY | KEY |
- | 5 | TABLE ACCESS BY GLOBAL INDEX ROWID| J_ORGANIZATION | 1 | 28
- | 2 (0)| 00:00:01 | ROW L | ROW L |
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- | 6 | INDEX UNIQUE SCAN | PK_ORG_SERIAL_ID | 1 |
- | 1 (0)| 00:00:01 | | |
- --------------------------------------------------------------------------------
- -----------------------------------------
- Query Block Name / Object Alias (identified by operation id):
- -------------------------------------------------------------
- 1 - SEL$5DA710D3
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- 4 - SEL$5DA710D3 / T@SEL$1
- 5 - SEL$5DA710D3 / J@SEL$2
- 6 - SEL$5DA710D3 / J@SEL$2
- Outline Data
- -------------
- /*+
- BEGIN_OUTLINE_DATA
- IGNORE_OPTIM_EMBEDDED_HINTS
- OPTIMIZER_FEATURES_ENABLE('10.2.0.4')
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- ALL_ROWS
- OUTLINE_LEAF(@"SEL$5DA710D3")
- UNNEST(@"SEL$2")
- OUTLINE(@"SEL$1")
- OUTLINE(@"SEL$2")
- FULL(@"SEL$5DA710D3" "T"@"SEL$1")
- INDEX_RS_ASC(@"SEL$5DA710D3" "J"@"SEL$2" ("J_ORGANIZATION"."ORG_SERIAL_ID"
- ))
- LEADING(@"SEL$5DA710D3" "T"@"SEL$1" "J"@"SEL$2")
- USE_NL(@"SEL$5DA710D3" "J"@"SEL$2")
- PLAN_TABLE_OUTPUT
- --------------------------------------------------------------------------------
- END_OUTLINE_DATA
- */
- Peeked Binds (identified by position):
- --------------------------------------
- 1 - :1 (VARCHAR2(30), CSID=852): '110000'
- 2 - :2 (VARCHAR2(30), CSID=852): '110000'
- 3 - :3 (VARCHAR2(30), CSID=852): 'BJBJXC000022738273'
复制代码 |
|