【TUNE_ORACLE】定製化執行計劃SQL參考
實驗環境
搭建平臺:VMware Workstation
OS:RHEL 6.10
Grid&DB:Oracle 11.2.0.4
SQL參考
select case
when access_predicates is not null or filter_predicates is not null then
'*' || id
else
' ' || id
end as "Id",
lpad(' ', level) || operation || ' ' || options "Operation",
object_name "Name",
cardinality "Rows",
b.size_mb "Mb",
case
when object_type like '%TABLE%' then
REGEXP_COUNT(a.projection, ']') || '/' || c.column_cnt
end as "Column",
access_predicates "Access",
filter_predicates "Filter",
case
when object_type like '%TABLE%' then
projection
end as "Projection"
from plan_table a,
(select owner, segment_name, sum(bytes / 1024 / 1024) size_mb
from dba_segments
group by owner, segment_name) b,
(select owner, table_name, count(*) column_cnt
from dba_tab_cols
group by owner, table_name) c
where a.object_owner = b.owner(+)
and a.object_name = b.segment_name(+)
and a.object_owner = c.owner(+)
and a.object_name = c.table_name(+)
start with id = 0
connect by prior id = parent_id;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69992972/viewspace-2785124/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【TUNE_ORACLE】定製化收集統計資訊SQL參考OracleSQL
- 【TUNE_ORACLE】ROWID切片SQL參考OracleSQL
- 【TUNE_ORACLE】檢查統計資訊是否過期SQL參考OracleSQL
- 【TUNE_ORACLE】列出走了Filter的SQL參考OracleFilterSQL
- 【TUNE_ORACLE】列出索引被哪些SQL引用的SQL參考Oracle索引SQL
- sql最佳化:使用儲存提綱穩定sql執行計劃SQL
- sql 執行計劃SQL
- SQL優化參考SQL優化
- sql 優化參考SQL優化
- 【TUNE_ORACLE】檢視錶,列和索引的統計資訊SQL參考Oracle索引SQL
- 【TUNE_ORACLE】列出LOOP套LOOP的PL/SQL程式碼SQL參考OracleOOPSQL
- SQL最佳化 —— 讀懂執行計劃SQL
- 【TUNE_ORACLE】檢視錶的總塊數SQL參考OracleSQL
- 【TUNE_ORACLE】檢視索引的叢集因子SQL參考Oracle索引SQL
- 【TUNE_ORACLE】列出有標量子查詢的SQL參考OracleSQL
- 【TUNE_ORACLE】列出走了INDEX FULL SCAN的SQL參考OracleIndexSQL
- 【TUNE_ORACLE】列出走了TABLE ACCESS FULL的SQL參考OracleSQL
- 【TUNE_ORACLE】列出走了笛卡爾積的SQL參考OracleSQL
- 【TUNE_ORACLE】列出走了INDEX SKIP SCAN的SQL參考OracleIndexSQL
- Oracle sql執行計劃OracleSQL
- SQL Server執行計劃SQLServer
- SQL的執行計劃SQL
- SQL執行計劃分析SQL
- 【TUNE_ORACLE】列出帶有自定義函式的SQL的SQL參考Oracle函式SQL
- 【TUNE_ORACLE】列出SQL謂詞中需要建立索引的列SQL參考OracleSQL索引
- 【sql調優之執行計劃】獲取執行計劃SQL
- 【TUNE_ORACLE】查出所有有“select *”語句的SQL參考OracleSQL
- 使用leading(,)優化sql執行計劃優化SQL
- 參考SQL Tunning Adviser進行SQL優化SQL優化
- 獲取SQL執行計劃SQL
- SQL 執行計劃案例1SQL
- 剖析SQL Server執行計劃SQLServer
- 檢視sql執行計劃SQL
- 【TUNE_ORACLE】列出返回行數較多的巢狀迴圈(NESTED LOOPS)SQL的SQL參考Oracle巢狀OOPSQL
- SQL優化案例-從執行計劃定位SQL問題(三)SQL優化
- 在容器中執行UI自動化參考UI
- 【TUNE_ORACLE】列出走了低選擇性索引的SQL參考Oracle索引SQL
- 【TUNE_ORACLE】檢視系統CPU和IO情況SQL參考OracleSQL