• oracle 执行计划查看常用sql



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


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

    1. Plan hash value: 3657219412
    2. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    3. | Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers | OMem | 1Mem | Used-Mem |
    4. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    5. | 0 | SELECT STATEMENT | | 1 | | | 4 (100)| | 10 |00:00:00.01 | 1390 | | | |
    6. |* 1 | VIEW | | 1 | 73 | 39274 | 4 (25)| 00:00:01 | 10 |00:00:00.01 | 1390 | | | |
    7. |* 2 | WINDOW SORT PUSHED RANK | | 1 | 73 | 76650 | 4 (25)| 00:00:01 | 30 |00:00:00.01 | 1390 | 4096 | 4096 | 4096 (0)|
    8. | 3 | NESTED LOOPS SEMI | | 1 | 73 | 76650 | 3 (0)| 00:00:01 | 73 |00:00:00.01 | 1390 | | | |
    9. | 4 | TABLE ACCESS FULL | POST | 1 | 500 | 256K| 3 (0)| 00:00:01 | 500 |00:00:00.01 | 7 | | | |
    10. |* 5 | TABLE ACCESS BY INDEX ROWID BATCHED| POST_COMMENT | 500 | 11 | 5775 | 0 (0)| | 73 |00:00:00.01 | 1383 | | | |
    11. |* 6 | INDEX RANGE SCAN | POST_REVIEW_IDX | 500 | 73 | | 0 (0)| | 33872 |00:00:00.01 | 8 | | | |
    12. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    13. Query Block Name / Object Alias (identified by operation id):
    14. -------------------------------------------------------------
    15. 1 - SEL$5DA710D3 / from$_subquery$_003@SEL$3
    16. 2 - SEL$5DA710D3
    17. 4 - SEL$5DA710D3 / P@SEL$1
    18. 5 - SEL$5DA710D3 / PC@SEL$2
    19. 6 - SEL$5DA710D3 / PC@SEL$2
    20. Outline Data
    21. -------------
    22. /*+
    23. BEGIN_OUTLINE_DATA
    24. IGNORE_OPTIM_EMBEDDED_HINTS
    25. OPTIMIZER_FEATURES_ENABLE('18.1.0')
    26. DB_VERSION('18.1.0')
    27. ALL_ROWS
    28. OUTLINE_LEAF(@"SEL$5DA710D3")
    29. UNNEST(@"SEL$2")
    30. OUTLINE_LEAF(@"SEL$3")
    31. OUTLINE(@"SEL$1")
    32. OUTLINE(@"SEL$2")
    33. NO_ACCESS(@"SEL$3" "from$_subquery$_003"@"SEL$3")
    34. FULL(@"SEL$5DA710D3" "P"@"SEL$1")
    35. INDEX_RS_ASC(@"SEL$5DA710D3" "PC"@"SEL$2" ("POST_COMMENT"."REVIEW"))
    36. BATCH_TABLE_ACCESS_BY_ROWID(@"SEL$5DA710D3" "PC"@"SEL$2")
    37. LEADING(@"SEL$5DA710D3" "P"@"SEL$1" "PC"@"SEL$2")
    38. USE_NL(@"SEL$5DA710D3" "PC"@"SEL$2")
    39. END_OUTLINE_DATA
    40. */
    41. Predicate Information (identified by operation id):
    42. ---------------------------------------------------
    43. 1 - filter(("from$_subquery$_003"."rowlimit_$$_rownumber"<=CASE WHEN (20>=0) THEN 20 ELSE 0 END +10 AND "from$_subquery$_003"."rowlimit_$$_rownumber">20))
    44. 2 - filter(ROW_NUMBER() OVER ( ORDER BY "P"."TITLE")<=CASE WHEN (20>=0) THEN 20 ELSE 0 END +10)
    45. 5 - filter("PC"."POST_ID"="P"."ID")
    46. 6 - access("PC"."REVIEW"='Bingo')
    47. Column Projection Information (identified by operation id):
    48. -----------------------------------------------------------
    49. 1 - (rowset=60) "from$_subquery$_003"."ID"[NUMBER,22], "from$_subquery$_003"."rowlimit_$$_rownumber"[NUMBER,22]
    50. 2 - (#keys=1; rowset=60) "P"."TITLE"[VARCHAR2,1020], "P"."ID"[NUMBER,22], ROW_NUMBER() OVER ( ORDER BY "P"."TITLE")[22]
    51. 3 - "P"."ID"[NUMBER,22], "P"."TITLE"[VARCHAR2,1020]
    52. 4 - "P"."ID"[NUMBER,22], "P"."TITLE"[VARCHAR2,1020]
    53. 6 - "PC".ROWID[ROWID,10]

    ALTER SESSION SET STATISTICS_LEVEL='ALL';

    1

    ALTER SESSION SET STATISTICS_LEVEL='TYPICAL'

  • 相关阅读:
    易基因|DNA甲基化揭示应激反应影响婴儿免疫相关基因的表观遗传调控机制 | 表观发育
    测试22222
    Libgdx游戏开发(2)——接水滴游戏实现
    基于redisson实现注解式分布式锁
    人脸识别技术,如何解决学校门禁安全?
    StableSwarmUI:功能强大且易于使用的Stable Diffusion WebUI
    生产依赖与开发依赖区别: 前端程序没有区别,后端程序有点区别
    ElementUI浅尝辄止38:Upload 上传
    MS做题记录
    dayjs 获取一周日期 MM.DD 判断今天日期以文字格式显示(场景积分积分签到)
  • 原文地址:https://blog.csdn.net/royjj/article/details/132983416