# DBE_PERF.SUMMARY_STATEMENT
获得各CN节点的执行语句（归一化SQL）的全量信息（包含DN），如[表1]所示。
 表1DBE_PERF.SUMMARY_STATEMENT字段 
| **名称**               | **类型**                 | **描述**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|:---|:---|:---|
| node_name             | name                     | 节点名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| node_id                | integer                | 节点的ID（pgxc_node中的node_id）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| user_name            | name                   | 用户名称，若查询时执行query语句的用户已不存在，则显示为\*REMOVED_USER\*。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| user_id                | oid                      | 用户OID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| unique_sql_id          | bigint                   | 归一化的SQL id。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| query                 | text                      | 归一化的SQL。 备注：长度受instr_unique_sql_size控制。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| n_calls                | bigint                 | 实际调用次数。对于存储过程中的FETCH语句，其实际触发次数，与其关联cursor实际执行语句的n_calls增量一致。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| min_elapse_time        | bigint                  | SQL在内核内的最小运行时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| max_elapse_time       | bigint                | SQL在内核内的最大运行时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| total_elapse_time     | bigint                 | SQL在内核内的总运行时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| n_returned_rows       | bigint                    | SELECT返回的结果集行数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| n_tuples_fetched       | bigint                 | 随机扫描行。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| n_tuples_returned     | bigint                   | 顺序扫描行。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| n_tuples_inserted     | bigint                   | 插入行。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| n_tuples_updated     | bigint                 | 更新行。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| n_tuples_deleted       | bigint                 | 删除行。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| n_blocks_fetched      | bigint                 | 逻辑读次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| n_blocks_hit         | bigint                  | 内存中命中次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| n_soft_parse         | bigint                   | 软解析次数，n_soft_parse + n_hard_parse可能大于n_calls，因为子查询未计入n_calls。（该字段对非DML语句无意义）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| n_hard_parse         | bigint                   | 硬解析次数，n_soft_parse + n_hard_parse可能大于n_calls，因为子查询未计入n_calls。对复杂数据类型的解析也会额外增加解析次数，例如smalldatetime类型。（该字段对非DML语句无意义）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| db_time               | bigint                | 有效的数据库内部时间花费，多线程将累加（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| cpu_time            | bigint                  | CPU时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| execution_time        | bigint                  | 执行器内执行时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| parse_time           | bigint                  | SQL解析时间（单位：微秒）。（若解析阶段出现异常，不记录parse_time）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| plan_time               | bigint                   | SQL生成计划时间（单位：微秒）。（若计划生成阶段出现异常，不记录plan_time）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| rewrite_time           | bigint                   | SQL重写时间（单位：微秒）。（若重写阶段出现异常，不记录rewrite_time）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| pl_execution_time     | bigint                  | plpgsql上的执行时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| pl_compilation_time   | bigint                 | plpgsql上的编译时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| data_io_time         | bigint                  | I/O上的时间花费（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| net_send_info        | text                  | 通过物理连接发送消息的网络状态，包含时间（微秒）、调用次数、吞吐量（字节）。在分布式数据库中，CN与CN、CN与客户端以及CN与DN之间都是通过物理连接进行通信，通过该字段可以分析SQL在分布式系统下的网络开销。 例如：{"time":xxx, "n_calls":xxx, "size":xxx}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| net_recv_info         | text                    | 通过物理连接接收消息的网络状态，包含时间（微秒）、调用次数、吞吐量（字节）。在分布式数据库中，CN与CN、CN与客户端以及CN与DN之间都是通过物理连接进行通信，通过该字段可以分析SQL在分布式系统下的网络开销。 例如：{"time":xxx, "n_calls":xxx, "size":xxx}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| net_stream_send_info   | text                    | 通过逻辑连接发送消息的网络状态，包含时间（微秒）、调用次数、吞吐量（字节）。在分布式数据库中，不同分片的DN之间通过逻辑连接进行通信，通过该字段可以分析SQL在分布式系统下的网络开销。 例如：{"time":xxx, "n_calls":xxx, "size":xxx}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| net_stream_recv_info  | text                    | 通过逻辑连接接收消息的网络状态，包含时间（微秒）、调用次数、吞吐量（字节）。在分布式数据库中，不同分片的DN之间通过逻辑连接进行通信，通过该字段可以分析SQL在分布式系统下的网络开销。 例如：{"time":xxx, "n_calls":xxx, "size":xxx}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| last_updated             | timestamp with time zone | 最后一次更新该语句的时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| sort_count             | bigint                  | 排序执行的次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| sort_time            | bigint                   | 排序执行的时间（单位：微秒），包括了sort算子和子算子的时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| sort_mem_used          | bigint                   | 排序过程中使用的work memory大小（单位：KB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| sort_spill_count     | bigint                 | 排序过程中，若发生落盘，写文件的次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| sort_spill_size       | bigint                   | 排序过程中，若发生落盘，使用的文件大小（单位：KB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| hash_count            | bigint                 | hash执行的次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| hash_time            | bigint                   | hash执行的时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| hash_mem_used         | bigint                 | hash过程中使用的work memory大小（单位：KB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| hash_spill_count      | bigint                  | hash过程中，若发生落盘，写文件的次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| hash_spill_size      | bigint                    | hash过程中，若发生落盘，使用的文件大小（单位：KB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| parent_unique_sql_id | bigint                 | 父语句的unique_sql_id，非存储过程子语句该值为0。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| lock_wait_time         | bigint                   | SQL的等锁时间（单位：微秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| total_used_memory     | bigint                  | 归一化语句的内存使用总量（单位：MB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| max_used_memory      | integer                  | 单条语句的最大内存使用量（单位：MB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| min_used_memory       | integer                 | 单条语句的最小内存使用量（单位：MB）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| db_name              | name                    | 连接后端的数据库名称，若查询时执行query语句的数据库已不存在，则显示为\*REMOVED_DB\*。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| db_id                   | oid                    | 连接后端的数据库OID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| eliminated_count        | bigint                  | prepare语句产生的计划缓存的淘汰次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| plan_count            | text                     | SQL的执行计划统计，包括LP、FQS、STREAM、PGXC（单位：次）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| aplan_count           | bigint                 | aplan执行次数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| aplan_parse_time     | bigint                   | aplan解析时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| aplan_execution_time   | bigint                    | aplan执行时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| hard_parse_reason      | text                    | 硬解析原因。具体原因包括： - first_execute：首次执行的硬解析次数。  - cplan：生成cplan的硬解析次数。  - gplan：生成gplan的硬解析次数。  - aplan：生成aplan的硬解析次数。  - revalid：生成计划失效后重建的硬解析次数。  - memory_control：内存管控淘汰后重建计划的硬解析次数。   以上原因存在逻辑重叠，例如首次执行且生成cplan，则hard_parse_reason为{"first_execute":1, "cplan":1, "gplan":0, "aplan":0, "revalid":0, "memory_control":0}。 当revalid项不为0时，将显示计划失效的原因及次数，例如："revalid":1{invalid reason: guc changed:1}。 |
| sql_hash             | bigint                   | 当前SQL语句的哈希值。当前模式记录为0。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| plan_hash              | bigint                  | 当前SQL计划的哈希值。当前模式记录为0。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
   
