statspack 裡sprepsql.sql 的用法和作用
sprepsql.sql 用於根據給定的SQL Hash 值生成SQL 報告
裡面包括完整的sql和對應的執行計劃
@sprepsql.sql 輸入開始和結束snap_id
然後再輸入sql hash value值 在輸入路徑和檔名 生成的報告如下:
STATSPACK SQL report for Hash Value: 2466850192 Module: JDBC Thin Client
DB Name DB Id Instance Inst Num Release Cluster Host
------------ ----------- ------------ -------- ----------- ------- ------------
ORCL 1067237780 orcl 1 9.2.0.5.0 NO p670
Start Id Start Time End Id End Time Duration(mins)
--------- ------------------- --------- ------------------- --------------
64 15-Jan-09 10:05:53 67 15-Jan-09 11:44:48 98.92
SQL Statistics
~~~~~~~~~~~~~~
-> CPU and Elapsed Time are in seconds (s) for Statement Total and in
milliseconds (ms) for Per Execute
% Snap
Statement Total Per Execute Total
--------------- --------------- ------
Buffer Gets: 95,473 95,473.0 .10
Disk Reads: 25,631 25,631.0 .40
Rows processed: 4 4.0
CPU Time(s/ms): 2 1,810.0
Elapsed Time(s/ms): 88 87,701.6
Sorts: 0 .0
Parse Calls: 1 1.0
Invalidations: 0
Version count: 1
Sharable Mem(K): 42
Executions: 1
SQL Text
~~~~~~~~
select * from (select rownum rn , T_RK_GMSFZBD.HKSZDPCS as "HK
SZDPCS",T_RK_GMSFZBD.HKSZDJWH as "HKSZDJWH",T_RK_GMSFZBD.XM as "
XM",T_RK_GMSFZBD.SFZHM as "SFZHM",T_RK_GMSFZBD.SLH as "SLH",T_RK
_GMSFZBD.LQ_FFR as "LQ_FFR",T_RK_GMSFZBD.LQ_LQRQ as "LQ_LQRQ" FR
OM T_RK_GMSFZBD Where ( (T_RK_GMSFZBD.GMSFZ_SLZT = '08') and
(T_RK_GMSFZBD.HKSZDPCS = '4401830016') and (T_RK_GMSFZBD.LQ
_LQRQ = '20090115') ) and rownum<11 ) where rn>=1
All Optimizer Plan(s) for this Hash Value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shows all known Optimizer Plans for this Hash value, and the Snap Id's they
were first found in the shared pool
-> ordered by Snap Id
Plan
Hash Value Snap Id Cost Optimizer
------------ -------- ---------- --------------------
3682949207 67 0 CHOOSE
Plans in shared pool between Begin and End Snap Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shows the Execution Plans found in the shared pool between the begin and end
snapshots specified. The values for Rows, Bytes and Cost shown below are those
which existed at the time the first-ever snapshot captured this plan - these
values often change over time, and so may not be indicative of current values
-> Rows indicates Cardinality, PHV is Plan Hash Value
-> ordered by Plan Hash Value
--------------------------------------------------------------------------------
| Operation | PHV/Object Name | Rows | Bytes| Cost |
--------------------------------------------------------------------------------
|SELECT STATEMENT |----- 3682949207 ----| | | |
|VIEW | | | | |
| COUNT STOPKEY | | | | |
| TABLE ACCESS BY INDEX ROWID |T_RK_GMSFZBD | | | |
| AND-EQUAL | | | | |
| INDEX RANGE SCAN |IDX_GMSFZB_GMSFZSLZT | | | |
| INDEX RANGE SCAN |IDX_GMSFZBDNEW_HKXZD | | | |
--------------------------------------------------------------------------------
End of Report
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-539769/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sql語句中as的用法和作用SQL
- C++引用的作用和用法C++
- CSS裡的BFC和IFC的用法CSS
- maven中profile元素的作用意義和用法Maven
- Html5 aside標籤的用法和作用HTMLIDE
- Qdrant用法;Qdrant在langchain裡的用法LangChain
- js裡document的用法JS
- Java中static變數作用和用法詳解Java變數
- scss 檔案裡的特殊符號 @ 和 @include 的用法CSS符號
- Git 的日常工作用法Git
- C#裡List的用法C#
- C#中SqlParameter的作用與用法C#SQL
- JavaScript 裡三個點 ... 的用法JavaScript
- Java裡的Character類的基本用法Java
- inline內聯的用法與作用inline
- Awr和statspack中的execute to parse和session_cached_cursorsSession
- javascript裡的document.all用法收集JavaScript
- Statspack之四-測試安裝好的Statspack
- Statspack之一-Statspack簡介
- Statspack之三-安裝statspack
- Python裡__all__變數的作用Python變數
- SAP SEGW 裡的 Entity Type 作用講解
- Angular 應用裡 index.html 的作用AngularIndexHTML
- js的作用域和作用域鏈JS
- Oracle Statspack的使用Oracle
- statspack安裝使用和report分析
- statspack安裝使用 和 report 分析
- C#中Thread.Sleep()的作用及用法C#thread
- JS中bind、call和apply的作用以及在TS裝飾器中的用法JSAPP
- Java中的volatile的作用和synchronized作用Javasynchronized
- Django裡URL配置中name引數的作用Django
- 【STATSPACK】Statspack安裝、測試與使用
- Token 的作用和原理
- statspack的安裝配置
- statspack分析
- statspack解析
- .NET裡面 abstract class和Interface有什麼區別以及用法的展現?
- HttpWebRequest和WebClient的用法HTTPWebclient