云数据库 GaussDB-ANALYZE | ANALYSE:语法格式

时间:2025-02-12 15:07:58

语法格式

  • 收集表的统计信息。
    { ANALYZE | ANALYSE } [ VERBOSE ]    [ table_name [ ( column_name [, ...] ) ] ] [ WITH PARTITION_MODE ];
  • 收集分区表的分区统计信息。
    { ANALYZE | ANALYSE } [ VERBOSE ]    table_name [ ( column_name [, ...] ) ] PARTITION ( partition_name ) ;
    • 使用关键字PARTITION,partition_name必须为一级分区名字。
    • 分布式不支持二级分区。
  • 收集外表的统计信息。
    { ANALYZE | ANALYSE } [ VERBOSE ]    { foreign_table_name | FOREIGN TABLES };
support.huaweicloud.com/distributed-devg-v8-gaussdb/gaussdb-12-0519.html