oracle awrsqrpt.sql 指令碼使用方法
這個指令碼可以很方便地取出某個sql在某兩個快照間隔內,消耗cpu時間,執行次數,邏輯讀,物理讀,sql的執行計劃以及sql的full sql text,對調優非常方便
以下是個例子
WORKLOAD REPOSITORY SQL Report
Snapshot Period Summary
DB Name DB Id Instance Inst Num Startup Time Release RAC
------------ ----------- ------------ -------- --------------- ----------- ---
test 45999999989 test 1 18-May-14 00:45 11.2.0.3.0 NO
Snap Id Snap Time Sessions Curs/Sess
--------- ------------------- -------- ---------
Begin Snap: 11707 09-Jul-14 10:00:47 1,266 38.1
End Snap: 11708 09-Jul-14 11:00:02 1,496 40.0
Elapsed: 59.25 (mins)
DB Time: 4,576.15 (mins)
SQL Summary DB/Inst: test/test Snaps: 11707-11708
Elapsed
SQL Id Time (ms)
------------- ----------
1agdrb19sf1f2 8.5506E+07
Module: JDBC Thin Client
select * from table where id='123456'
-------------------------------------------------------------
SQL ID: 1agdrb19sf1f2 DB/Inst:test/test Snaps: 11707-11708
-> 1st Capture and Last Capture Snap IDs
refer to Snapshot IDs witin the snapshot range
-> select vrycjsqlis0_.SQ_ID as SQ1_478_, vrycjsqlis0_.RYXH as RYXH478_, ...
Plan Hash Total Elapsed 1st Capture Last Capture
# Value Time(ms) Executions Snap ID Snap ID
--- ---------------- ---------------- ------------- ------------- --------------
1 1091025147 85,505,996 2,3286 11708 11708
-------------------------------------------------------------
Plan 1(PHV: 1091025147)
-----------------------
Plan Statistics DB/Inst: test/test Snaps: 11707-11708
-> % Total DB Time is the Elapsed Time of the SQL statement divided
into the Total Database Time multiplied by 100
Stat Name Statement Per Execution % Snap
---------------------------------------- ---------- -------------- -------
Elapsed Time (ms) 8.5506E+07 3,672.0 31.1
CPU Time (ms) 3.0166E+07 1,295.5 37.6
Executions 23,286 N/A N/A
Buffer Gets 0 0.0 0.0
Disk Reads 0 0.0 0.0
Parse Calls 5,470 0.2 0.1
Rows 124,801 5.4 N/A
User I/O Wait Time (ms) 0 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 17,775 N/A N/A
Invalidations 0 N/A N/A
Version Count 3 N/A N/A
Sharable Mem(KB) 113 N/A N/A
-------------------------------------------------------------
Execution Plan
------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 35 (100)| |
| 1 | TABLE ACCESS FULL| test | 1 | 3282 | 35 (0)| 00:00:01 |
------------------------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement (level=2)
Full SQL Text
SQL ID SQL Text
------------ -----------------------------------------------------------------
1agdrb19sf1f select * from test
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-1219730/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- awrsqrpt.sql使用方法,功能持續完善中SQL
- MongoDB服務端JavaScript指令碼使用方法MongoDB服務端JavaScript指令碼
- awrsqrpt.sql 在oracle 版本10.2.0.4(for windows)的bugSQLOracleWindows
- Oracle rman 指令碼Oracle指令碼
- Oracle expdp 指令碼Oracle指令碼
- Linux——指令使用方法!Linux
- ORACLE備份指令碼Oracle指令碼
- oracle建庫指令碼Oracle指令碼
- [Oracle] 指令碼建立DBOracle指令碼
- oracle 熱備指令碼 .Oracle指令碼
- Oracle登入指令碼Oracle指令碼
- oracle自帶指令碼Oracle指令碼
- oracle 備份指令碼Oracle指令碼
- oracle 監控指令碼Oracle指令碼
- oracle獲取ddl指令碼Oracle指令碼
- oracle 索引重建提示指令碼Oracle索引指令碼
- 檢視ORACLE AS 埠指令碼Oracle指令碼
- ORACLE日常備份指令碼Oracle指令碼
- (轉)ORACLE 巡檢指令碼Oracle指令碼
- Oracle 集中備份指令碼Oracle指令碼
- oracle冷備指令碼薦Oracle指令碼
- ORACLE常用SQL指令碼2OracleSQL指令碼
- Oracle管理指令碼介紹Oracle指令碼
- oracle報表相關指令碼Oracle指令碼
- oracle登陸限制指令碼Oracle指令碼
- oracle linux rman 指令碼OracleLinux指令碼
- oracle RMAN備份指令碼Oracle指令碼
- ORACLE的啟動指令碼Oracle指令碼
- oracle的冷備指令碼Oracle指令碼
- oracle的熱備指令碼Oracle指令碼
- oracle_備份指令碼Oracle指令碼
- 【TABLE】Oracle表資訊收集指令碼Oracle指令碼
- [Oracle] rman備份指令碼(2)Oracle指令碼
- Oracle DBA常用監控指令碼Oracle指令碼
- ecs使用指令碼安裝oracle指令碼Oracle
- 巡檢指令碼OS+Oracle指令碼Oracle
- Oracle指令碼收集【不定時更新】Oracle指令碼
- oracle for linux 備份指令碼OracleLinux指令碼