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

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

语法格式

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

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

    ANALYZE [ boolean ] |
        ANALYSE [ boolean ] |
        VERBOSE [ boolean ] |
        COSTS [ boolean ] |
        CPU [ boolean ] |
        DETAIL [ boolean ] |
        BUFFERS [ boolean ] |
        TIMING [ boolean ] |
        PLAN [ boolean ] |
        BLOCKNAME [ boolean ] |
        OUTLINE [ boolean ] |
        ADAPTCOST [ boolean ] |
        FORMAT { TEXT | XML | JSON | YAML } |
        OPTEVAL [ boolean ]

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

support.huaweicloud.com/centralized-devg-v8-gaussdb/gaussdb-42-0642.html