oracle 执行计划查看常用sql

SELECT /*+ GATHER_PLAN_STATISTICS */ ....................

SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(FORMAT=>'ALLSTATS LAST ALL +OUTLINE'));

sql 复制代码
Plan hash value: 3657219412
  
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Id  | Operation                              | Name            | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time   | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                       |                 |      1 |        |       |     4 (100)|          |     10 |00:00:00.01 |    1390 |       |       |          |
|*  1 |  VIEW                                  |                 |      1 |     73 | 39274 |     4  (25)| 00:00:01 |     10 |00:00:00.01 |    1390 |       |       |          |
|*  2 |   WINDOW SORT PUSHED RANK              |                 |      1 |     73 | 76650 |     4  (25)| 00:00:01 |     30 |00:00:00.01 |    1390 |  4096 |  4096 | 4096  (0)|
|   3 |    NESTED LOOPS SEMI                   |                 |      1 |     73 | 76650 |     3   (0)| 00:00:01 |     73 |00:00:00.01 |    1390 |       |       |          |
|   4 |     TABLE ACCESS FULL                  | POST            |      1 |    500 |   256K|     3   (0)| 00:00:01 |    500 |00:00:00.01 |       7 |       |       |          |
|*  5 |     TABLE ACCESS BY INDEX ROWID BATCHED| POST_COMMENT    |    500 |     11 |  5775 |     0   (0)|          |     73 |00:00:00.01 |    1383 |       |       |          |
|*  6 |      INDEX RANGE SCAN                  | POST_REVIEW_IDX |    500 |     73 |       |     0   (0)|          |  33872 |00:00:00.01 |       8 |       |       |          |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  
Query Block Name / Object Alias (identified by operation id):
-------------------------------------------------------------
  
   1 - SEL$5DA710D3 / from$_subquery$_003@SEL$3
   2 - SEL$5DA710D3
   4 - SEL$5DA710D3 / P@SEL$1
   5 - SEL$5DA710D3 / PC@SEL$2
   6 - SEL$5DA710D3 / PC@SEL$2
  
Outline Data
-------------
  
  /*+
      BEGIN_OUTLINE_DATA
      IGNORE_OPTIM_EMBEDDED_HINTS
      OPTIMIZER_FEATURES_ENABLE('18.1.0')
      DB_VERSION('18.1.0')
      ALL_ROWS
      OUTLINE_LEAF(@"SEL$5DA710D3")
      UNNEST(@"SEL$2")
      OUTLINE_LEAF(@"SEL$3")
      OUTLINE(@"SEL$1")
      OUTLINE(@"SEL$2")
      NO_ACCESS(@"SEL$3" "from$_subquery$_003"@"SEL$3")
      FULL(@"SEL$5DA710D3" "P"@"SEL$1")
      INDEX_RS_ASC(@"SEL$5DA710D3" "PC"@"SEL$2" ("POST_COMMENT"."REVIEW"))
      BATCH_TABLE_ACCESS_BY_ROWID(@"SEL$5DA710D3" "PC"@"SEL$2")
      LEADING(@"SEL$5DA710D3" "P"@"SEL$1" "PC"@"SEL$2")
      USE_NL(@"SEL$5DA710D3" "PC"@"SEL$2")
      END_OUTLINE_DATA
  */
  
Predicate Information (identified by operation id):
---------------------------------------------------
  
   1 - filter(("from$_subquery$_003"."rowlimit_$$_rownumber"<=CASE  WHEN (20>=0) THEN 20 ELSE 0 END +10 AND "from$_subquery$_003"."rowlimit_$$_rownumber">20))
   2 - filter(ROW_NUMBER() OVER ( ORDER BY "P"."TITLE")<=CASE  WHEN (20>=0) THEN 20 ELSE 0 END +10)
   5 - filter("PC"."POST_ID"="P"."ID")
   6 - access("PC"."REVIEW"='Bingo')
  
Column Projection Information (identified by operation id):
-----------------------------------------------------------
  
   1 - (rowset=60) "from$_subquery$_003"."ID"[NUMBER,22], "from$_subquery$_003"."rowlimit_$$_rownumber"[NUMBER,22]
   2 - (#keys=1; rowset=60) "P"."TITLE"[VARCHAR2,1020], "P"."ID"[NUMBER,22], ROW_NUMBER() OVER ( ORDER BY "P"."TITLE")[22]
   3 - "P"."ID"[NUMBER,22], "P"."TITLE"[VARCHAR2,1020]
   4 - "P"."ID"[NUMBER,22], "P"."TITLE"[VARCHAR2,1020]
   6 - "PC".ROWID[ROWID,10]

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ALTER SESSION ``SET STATISTICS_LEVEL=``'ALL'; |---|--------------------------------------------------------| | 1 | ALTER SESSION ``SET STATISTICS_LEVEL=``'TYPICAL' | |

相关推荐
大哥喝阔落11 分钟前
fitz获取pdf内容
服务器·数据库·pdf
文慧的科技江湖33 分钟前
欧标开源OCPP充电桩平台 V2.6.8 - 慧知开源充电平台
mysql·spring cloud·开源·充电桩·直流充电桩·交流充电桩·ocpp
三天不学习1 小时前
【update 更新数据语法合集】.NET开源ORM框架 SqlSugar 系列
数据库·后端·c#·.net·orm·sqlsugar
Faxxtty1 小时前
【MySQL】SQL菜鸟教程(二)
数据库·sql·mysql
专注API从业者1 小时前
如何处理获取到的淘宝评论数据以进行有效的商品品控?
大数据·开发语言·数据库·算法
weisian1512 小时前
Mysql--架构篇--存储引擎InnoDB(内存结构,磁盘结构,存储结构,日志管理,锁机制,事务并发控制等)
数据库·mysql·架构
Java 第一深情2 小时前
MySQL核心揭秘:InnoDB存储引擎高级特性
数据库·mysql
曹二7472 小时前
MySQL_约束
数据库·sql
神仙别闹2 小时前
基于JSP+MySQL实现的校园bbs论坛
java·开发语言·mysql