|
|
|
|
|
|
|
---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|---|---|
|
|
|
|
|
在awr中定位到问题sql语句后想要了解该sql statement的具体执行计划,于是就用awr报告中得到的sql id去v$sql等几个动态性能视图中查询,但发现v$sql或v$sql_plan视图都已经找不到对应sql id的记录,一般来说这些语句已经从shared pool共享池中被替换出去了。
这个时候我们可以尝试使用dbms_xplan.display_awr存储过程来将oracle automatic workload repository自动负载仓库中记录的sql语句相关信息抽取出来,如:
@?/rdbms/admin/awrsqrpt.sql
下面是上诉语句生成的awrsql:
workload repository sql report
snapshot period summary
sql summary
back to top
sql id: 1rrtf60fmhxkj
1st capture and last capture snap ids refer to snapshot ids witin the snapshot range
select count(*) from t1,t2 where t1.object_id=t2.object_id
plan statistics
execution plan back to top
% total db time is the elapsed time of the sql statement pided into the total database time multiplied by 100
dynamic sampling used for this statement (level=2)
需要了解更多数据库技术:-性能优化工具(5)-AWRSQL,都可以关注数据库技术分享栏目—计算机技术网(www.ctvol.com)!
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/dtteaching/798214.html