1colsql_fulltextfora50
2col平均执行时间fora10
3col总执行时间fora10
4colsql_idfora15
5colosuserfora10
6colusernamefora10
7select
8to_char(sa.last_active_time,'hh24:mi:ss')time,
9se.osuser,
10se.username,
11se.sql_id,
12sa.sql_fulltext,
13sa.executions"执行次数",
14round(sa.elapsed_time/1000000,2)||'s'"总执行时间",
15round(sa.elapsed_time/1000000/sa.executions,2)||'s'"平均执行时
间"
16from(selects.osuser,s.username,s.sql_id
17fromv$sessions
18wheres.usernamein('scott')‐‐用户名
19ands.sql_idisnotnull
20groupbys.osuser,s.username,s.sql_id)se
21leftjoinv$sqlareasa
22onse.sql_id=sa.sql_id
23wheresa.executions>0
文档被以下合辑收录
评论