云数据库 GAUSSDB-EXPLAIN:语法格式

时间:2024-12-13 17:15:47

语法格式

  • 显示SQL语句的执行计划,支持多种选项,对选项顺序无要求。
    1
    EXPLAIN [ ( option [, ...] ) ] statement;
    

    其中选项option子句的语法为。

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    ANALYZE [ boolean ] |
        ANALYSE [ boolean ] |
        VERBOSE [ boolean ] |
        COSTS [ boolean ] |
        CPU [ boolean ] |
        DETAIL [ boolean ] |
        NODES [ boolean ] |
        NUM_NODES [ boolean ] |
        BUFFERS [ boolean ] |
        TIMING [ boolean ] |
        PLAN [ boolean ] |
        BLOCKNAME [ boolean ] |
        FORMAT { TEXT | XML | JSON | YAML }
    

  • 显示SQL语句的执行计划,且要按顺序给出选项。
    1
    EXPLAIN { [ ANALYZE | ANALYSE ] [ VERBOSE ] | PERFORMANCE } statement;
    

support.huaweicloud.com/distributed-devg-v8-gaussdb/gaussdb-12-0632.html