SESSION_ID SQL_ID MACHINE BLOCKING_SESSION SAMPLE_TIME MODULE PROGRAM EVENT SQL_TEXT
1 2184 505mpuw9uwg69 outdata_app1 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
2 3031 505mpuw9uwg69 outdata_app2 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
3 3634 505mpuw9uwg69 outdata_app2 4238 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
4 4238 505mpuw9uwg69 outdata_app2 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
5 4600 505mpuw9uwg69 outdata_app2 4238 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
6 4604 505mpuw9uwg69 outdata_app1 4238 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
7 4844 505mpuw9uwg69 outdata_app2 4238 22-5月 -18 01.55.22.395 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
8 6537 8w7xq679zarun WORKGROUPSHTERM-APP 22-5月 -18 01.55.22.395 下午 PL/SQL Developer plsqldev.exe select a.session_id, a.sql_id, a.machine, a.blocking_session, a.sample_time, a.module, a.PROGRAM, a.event, b.SQL_TEXT from v$active_session_history a, v$sqlarea b where a.sql_id = b.sql_id
9 2184 505mpuw9uwg69 outdata_app1 4600 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
10 3031 505mpuw9uwg69 outdata_app2 4600 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
11 3634 505mpuw9uwg69 outdata_app2 4600 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
12 4238 505mpuw9uwg69 outdata_app2 4600 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
13 4600 505mpuw9uwg69 outdata_app2 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
14 4604 505mpuw9uwg69 outdata_app1 4600 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
15 4844 505mpuw9uwg69 outdata_app2 3634 22-5月 -18 01.55.21.389 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
16 6537 8w7xq679zarun WORKGROUPSHTERM-APP 22-5月 -18 01.55.21.389 下午 PL/SQL Developer plsqldev.exe select a.session_id, a.sql_id, a.machine, a.blocking_session, a.sample_time, a.module, a.PROGRAM, a.event, b.SQL_TEXT from v$active_session_history a, v$sqlarea b where a.sql_id = b.sql_id
17 2184 505mpuw9uwg69 outdata_app1 22-5月 -18 01.55.20.383 下午 JDBC Thin Client JDBC Thin Client "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
18 3031 505mpuw9uwg69 outdata_app2 2184 22-5月 -18 01.55.20.383 下午 JDBC Thin Client JDBC Thin Client cursor: mutex X "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
select * from v$sqlarea where sql_id='505mpuw9uwg69';
SQL_TEXT "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 "
SQL_FULLTEXT <CLOB>
SQL_ID 505mpuw9uwg69
SHARABLE_MEM 221761554
PERSISTENT_MEM 63670992
RUNTIME_MEM 51208488
SORTS 0
VERSION_COUNT 7383
LOADED_VERSIONS 7382
OPEN_VERSIONS 15
select VERSION_COUNT from v$sqlarea where sql_id='505mpuw9uwg69'
union all
select count(*) from v$sql a where a.sql_id='505mpuw9uwg69'
VERSION_COUNT
7402
7402
v$sqlarea 显示统计信息在shared sql areas 包含每条SQL一条记录, 它提供了在内存里的,解析好的,准备执行的SQL语句的信息
SQL_TEXT SQL文本的头1000个字符用于当前游标
SQL_ID sql 标识用于父游标在library cache
SHARABLE_MEM 221761554 一个cursor 使用的共享内存的总量,如果多个child cursors 存在,则是所有子游标使用共享内存的总和
VERSION_COUNT 7383 子游标的数量 在cache中在这个父游标下
v$sql
child_number 子游标的个数 =v$sqlarea 的 VERSION_COUNT
SQL_TEXT SQL_ID HASH_VALUE ADDRESS CHILD_NUMBER CHILD_ADDRESS
------------------------------ ---------- ---------- ---------------- ------------ ----------------
FROM TD_PR 505mpuw9uw 330185929 000000016EA9BBF8 7736 00000004DCF655C0
WHE g69PORT_PLATFRDAL d
AND d.T_REPORTID=:1
AND d.TPP_PLATF
ORMID=:3
FROM TD_PR 505mpuw9uw 330185929 000000016EA9BBF8 7735 00000004DD663BE0
WHE g69PORT_PLATFRDAL d
AND d.T_REPORTID=:1
AND d.TPP_PLATF
ORMID=:3
FROM TD_PR 505mpuw9uw 330185929 000000016EA9BBF8 7734 00000004D412BC60
WHE g69PORT_PLATFRDAL d
AND d.T_REPORTID=:1
AND d.TPP_PLATF
ORMID=:3
FROM TD_PR 505mpuw9uw 330185929 000000016EA9BBF8 7733 00000004DC2E8418
WHE g69PORT_PLATFRDAL d
select version_count from v$sqlarea where sql_id='505mpuw9uwg69'
union all
select count(*) from v$sql a where a.sql_id='505mpuw9uwg69'
UNION ALL
select max(child_number) from v$sql a where a.sql_id='505mpuw9uwg69'
VERSION_COUNT
1 7821
2 7821
3 7820
SQL> select * from ( select sql_text, executions,version_count,sql_id from v$sqlarea a order by a.executions desc) where rownum<20;
SQL_TEXT EXECUTIONS VERSION_COUNT SQL_ID
1 BEGIN PUB_PCKG_FEEDEAL.CHECK_CHLBRHFEE (:1 , :2 , :3 ) ; END; 995065 1 9xkdzytxt8tbk
2 BEGIN PUB_PCKG_INTERFAUTH.CHECK_CHLAUTH (:1 , :2 , :3 ) ; END; 995017 1 9ch7x91221c9r
3 BEGIN PUB_PCKG_FEEDEAL.UPDATE_CHLBRHFEE (:1 , :2 , :3 , :4 , :5 , :6 ) ; END; 989102 1 gwhkjruypvtsy
4 BEGIN PUB_PCKG_FEEDEAL.CHECK_DRSFEE (:1 , :2 ) ; END; 723853 1 bh97ddadqzgvv
5 BEGIN PUB_PCKG_INTERFAUTH.CHECK_DRSAUTH (:1 , :2 ) ; END; 723766 1 g12qjarhgnkmx
6 BEGIN PUB_PCKG_FEEDEAL.UPDATE_DRSFEE (:1 , :2 , :3 , :4 , :5 , :6 ) ; END; 405663 1 5avw18xusy6yx
7 SELECT 1 FROM DUAL 394830 1 bunvx480ynf57
8 select /*+ connect_by_filtering index(sysauth$ i_sysauth1) */ privilege#, bitand(nvl(option$, 0), 72), grantee#, level from sysauth$ connect by grantee#=prior privilege# and privilege#>0 start with grantee#=:1 and privilege#>0 347475 10 5dqz0hqtp9fru
9 SELECT FY_FLOW_NO.NEXTVAL FROM DUAL 222304 1 6bmzztn2hut2z
10 SELECT TO_CHAR(SYSDATE, 'yyyymmddhh24miss') FROM DUAL 220089 1 1zx80p9wnxapg
11 SELECT TO_DATE( :B2 , 'yyyymmddhh24miss') - TO_DATE(:B1 ,'yyyymmddhh24miss') AS DAY FROM DUAL 212131 1 3ba757jn1sv1d
12 BEGIN PUB_PCKG_TIMELIMIT.CHECK_TIME (:1 , :2 , :3 ) ; END; 194601 1 96wcyqs9g97v0
13 SELECT BD_FLOW_NO.NEXTVAL FROM DUAL 167241 1 3wtmqdvunk90m
14 SELECT FY_REPORT_ID.NEXTVAL FROM DUAL 166634 1 g0uf9np6fb6k7
15 SELECT CLF_FLAG FROM PUB_CHLDEF WHERE CLF_CHLCODE = :B1 121264 7 6stry6k7p4gdx
16 select decode(upper(failover_method), NULL, 0 , 'BASIC', 1, 'PRECONNECT', 2 , 'PREPARSE', 4 , 0), decode(upper(failover_type), NULL, 1, 'NONE', 1, 'SESSION', 2, 'SELECT', 4, 'TRANSACTION', 8, 1), failover_retries, failover_delay, flags, nvl(replay_initiation_timeout, 300), decode(upper(session_state_consistency), 'STATIC', 16, 0), failover_restore from sys.service$ where name = :1 113093 16 7n9pz49qw4f39
17 SELECT T.CLF_FEE_CONTROL, T.CLF_FEEUSED, T.CLF_FEELIMIT FROM PUB_CHLDEF T WHERE T.CLF_CHLCODE = :B1 87829 11 2qu5tq7qzjy0f
18 "SELECT TPP_DETAIL
FROM TD_PRELOAN_REPORT_PLATFRDAL d
WHERE d.TPP_REPORTID=:1
AND d.TPP_ITEMID=:2
AND d.TPP_PLATFORMID=:3 " 73423 7883 505mpuw9uwg69
19 "UPDATE PUB_TRANFLOW
SET PBT_RETCODE='000000',
PBT_RETMSG='交易成功',
PBT_CHARGEID=:1 ,
PBT_CHARGEAMOUNT=:2 ,
PBT_CHECKTYPE=:3 ,
PBT_IFRICHARD=:4 ,
PBT_REPORTID=:5
WHERE PBT_FLOWNO=:6 " 70090 3 b6vcrakqqz561
看来不是执行次数导致的,看着像12c bug
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CON_ID
----------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
0
PL/SQL Release 12.2.0.1.0 - Production