[Oracle]-性能优化工具(5)-AWRSQL
程序员文章站
2023-01-26 20:30:09
db name
db id
instance...
|
|
|
|
|
|
|
---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|---|---|
|
|
|
|
|
这个时候我们可以尝试使用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 topsql 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)