云服务器内容精选

  • GLOBAL_STATEMENT_COUNT 显示数据库各节点当前时刻执行的五类语句(SELECT、INSERT、UPDATE、DELETE、MERGE INTO)和(DDL、DML、DCL)统计信息。 表1 GLOBAL_STATEMENT_COUNT字段 名称 类型 描述 node_name text 节点名称。 user_name text 用户名。 select_count bigint select语句统计结果。 update_count bigint update语句统计结果。 insert_count bigint insert语句统计结果。 delete_count bigint delete语句统计结果。 mergeinto_count bigint merge into语句统计结果。 ddl_count bigint DDL语句的数量。 dml_count bigint DML语句的数量。 dcl_count bigint DCL语句的数量。 total_select_elapse bigint 总select的时间花费(单位:微秒)。 avg_select_elapse bigint 平均select的时间花费(单位:微秒)。 max_select_elapse bigint 最大select的时间花费(单位:微秒)。 min_select_elapse bigint 最小select的时间花费(单位:微秒)。 total_update_elapse bigint 总update的时间花费(单位:微秒)。 avg_update_elapse bigint 平均update的时间花费(单位:微秒)。 max_update_elapse bigint 最大update的时间花费(单位:微秒)。 min_update_elapse bigint 最小update的时间花费(单位:微秒)。 total_insert_elapse bigint 总insert的时间花费(单位:微秒)。 avg_insert_elapse bigint 平均insert的时间花费(单位:微秒)。 max_insert_elapse bigint 最大insert的时间花费(单位:微秒)。 min_insert_elapse bigint 最小insert的时间花费(单位:微秒)。 total_delete_elapse bigint 总delete的时间花费(单位:微秒)。 avg_delete_elapse bigint 平均delete的时间花费(单位:微秒)。 max_delete_elapse bigint 最大delete的时间花费(单位:微秒)。 min_delete_elapse bigint 最小delete的时间花费(单位:微秒)。 父主题: Query
  • SUMMARY_STATEMENT 获得各CN节点的执行语句(归一化SQL)的全量信息(包含DN)。 表1 SUMMARY_STATEMENT字段 名称 类型 描述 node_name name 节点名称。 node_id integer 节点的ID(pgxc_node中的node_id)。 user_name name 用户名称。 user_id oid 用户OID。 unique_sql_id bigint 归一化的SQL ID。 query text 归一化的SQL。 备注:长度受track_activity_query_size控制。 n_calls bigint 调用次数。 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 buffer的块访问次数。 n_blocks_hit bigint buffer的块命中次数。 n_soft_parse bigint 软解析次数。 n_hard_parse bigint 硬解析次数。 db_time bigint 有效的DB时间花费,多线程将累加(单位:微秒)。 cpu_time bigint CPU时间(单位:微秒)。 execution_time bigint 执行器内执行时间(单位:微秒)。 parse_time bigint SQL解析时间(单位:微秒)。 plan_time bigint SQL生成计划时间(单位:微秒)。 rewrite_time bigint SQL重写时间(单位:微秒)。 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_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。 父主题: Query
  • GS_SLOW_QUERY_INFO GS_SLOW_QUERY_INFO视图显示当前节点上已经转储的慢查询信息。此数据是从内核中转储到系统表中的数据。当设置GUC参数enable_resource_record为on时,系统会定时(周期为3分钟)将内核中query信息导入GS_WLM_SESSION_QUERY_INFO_ALL系统表,开启此功能会占用系统存储空间并对性能有一定影响。用户通过查询GS_SLOW_QUERY_INFO视图,可以查看已经转储的慢查询信息,本版本中已废弃。 表1 GS_SLOW_QUERY_INFO字段 名称 类型 描述 dbname text 数据库名称。 schemaname text schema名称。 nodename text 节点名称。 username text 用户名。 queryid bigint 归一化ID。 query text query语句。 start_time timestamp with time zone 开始执行时间。 finish_time timestamp with time zone 结束执行时间。 duration bigint 执行持续时间(毫秒)。 query_plan text 计划信息。 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 Cache加载次数。 n_blocks_hit bigint Cache命中数。 db_time bigint 有效的DB时间花费,多线程将累加(单位:微秒)。 cpu_time bigint CPU时间(单位:微秒)。 execution_time bigint 执行器内执行时间(单位:微秒)。 parse_time bigint SQL解析时间(单位:微秒)。 plan_time bigint SQL生成计划时间(单位:微秒)。 rewrite_time bigint SQL重写时间(单位:微秒)。 pl_execution_time bigint plpgsql上的执行时间(单位:微秒)。 pl_compilation_time bigint plpgsql上的编译时间(单位:微秒)。 net_send_time bigint 网络上的时间花费(单位:微秒)。 data_io_time bigint IO上的时间花费(单位:微秒)。 父主题: Query
  • GS_SLOW_QUERY_INFO GS_SLOW_QUERY_INFO视图显示当前节点上已经转储的慢查询信息。此数据是从内核中转储到系统表中的数据。当设置GUC参数enable_resource_record为on时,系统会定时(周期为3分钟)将内核中query信息导入GS_WLM_SESSION_QUERY_INFO_ALL系统表,开启此功能会占用系统存储空间并对性能有一定影响。用户通过查询GS_SLOW_QUERY_INFO视图,可以查看已经转储的慢查询信息,本版本中已废弃。 表1 GS_SLOW_QUERY_INFO字段 名称 类型 描述 dbname text 数据库名称。 schemaname text schema名称。 nodename text 节点名称。 username text 用户名。 queryid bigint 归一化ID。 query text query语句。 start_time timestamp with time zone 开始执行时间。 finish_time timestamp with time zone 结束执行时间。 duration bigint 执行持续时间(毫秒)。 query_plan text 计划信息。 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 Cache加载次数。 n_blocks_hit bigint Cache命中数。 db_time bigint 有效的DB时间花费,多线程将累加(单位:微秒)。 cpu_time bigint CPU时间(单位:微秒)。 execution_time bigint 执行器内执行时间(单位:微秒)。 parse_time bigint SQL解析时间(单位:微秒)。 plan_time bigint SQL生成计划时间(单位:微秒)。 rewrite_time bigint SQL重写时间(单位:微秒)。 pl_execution_time bigint plpgsql上的执行时间(单位:微秒)。 pl_compilation_time bigint plpgsql上的编译时间(单位:微秒)。 net_send_time bigint 网络上的时间花费(单位:微秒)。 data_io_time bigint IO上的时间花费(单位:微秒)。 父主题: Query
  • GLOBAL_STATEMENT_COUNT 显示数据库各节点当前时刻执行的五类语句(SELECT、INSERT、UPDATE、DELETE、MERGE INTO)和(DDL、DML、DCL)统计信息。 表1 GLOBAL_STATEMENT_COUNT字段 名称 类型 描述 node_name text 节点名称。 user_name text 用户名。 select_count bigint select语句统计结果。 update_count bigint update语句统计结果。 insert_count bigint insert语句统计结果。 delete_count bigint delete语句统计结果。 mergeinto_count bigint merge into语句统计结果。 ddl_count bigint DDL语句的数量。 dml_count bigint DML语句的数量。 dcl_count bigint DCL语句的数量。 total_select_elapse bigint 总select的时间花费(单位:微秒)。 avg_select_elapse bigint 平均select的时间花费(单位:微秒)。 max_select_elapse bigint 最大select的时间花费(单位:微秒)。 min_select_elapse bigint 最小select的时间花费(单位:微秒)。 total_update_elapse bigint 总update的时间花费(单位:微秒)。 avg_update_elapse bigint 平均update的时间花费(单位:微秒)。 max_update_elapse bigint 最大update的时间花费(单位:微秒)。 min_update_elapse bigint 最小update的时间花费(单位:微秒)。 total_insert_elapse bigint 总insert的时间花费(单位:微秒)。 avg_insert_elapse bigint 平均insert的时间花费(单位:微秒)。 max_insert_elapse bigint 最大insert的时间花费(单位:微秒)。 min_insert_elapse bigint 最小insert的时间花费(单位:微秒)。 total_delete_elapse bigint 总delete的时间花费(单位:微秒)。 avg_delete_elapse bigint 平均delete的时间花费(单位:微秒)。 max_delete_elapse bigint 最大delete的时间花费(单位:微秒)。 min_delete_elapse bigint 最小delete的时间花费(单位:微秒)。 父主题: Query
  • STATEMENT_COUNT 显示数据库当前节点当前时刻执行的五类语句(SELECT、INSERT、UPDATE、DELETE、MERGE INTO)和(DDL、DML、DCL)统计信息。 管理员权限用户查询STATEMENT_COUNT视图则能看到所有用户当前节点的统计信息。当数据库或该节点重启时,计数将清零,并重新开始计数。计数以节点收到的查询数为准,数据库内部进行的查询。例如,数据库主节点收到一条查询,若下发多条查询数据库节点,那将在数据库节点上进行相应次数的计数。 表1 STATEMENT_COUNT字段 名称 类型 描述 node_name text 数据库进程名称。 user_name text 用户名。 select_count bigint select语句统计结果。 update_count bigint update语句统计结果。 insert_count bigint insert语句统计结果。 delete_count bigint delete语句统计结果。 mergeinto_count bigint merge into语句统计结果。 ddl_count bigint DDL语句的数量。 dml_count bigint DML语句的数量。 dcl_count bigint DCL语句的数量。 total_select_elapse bigint 总select的时间花费(单位:微秒)。 avg_select_elapse bigint 平均select的时间花费(单位:微秒)。 max_select_elapse bigint 最大select的时间花费(单位:微秒)。 min_select_elapse bigint 最小select的时间花费(单位:微秒)。 total_update_elapse bigint 总update的时间花费(单位:微秒)。 avg_update_elapse bigint 平均update的时间花费(单位:微秒)。 max_update_elapse bigint 最大update的时间花费(单位:微秒)。 min_update_elapse bigint 最小update的时间花费(单位:微秒)。 total_insert_elapse bigint 总insert的时间花费(单位:微秒)。 avg_insert_elapse bigint 平均insert的时间花费(单位:微秒)。 max_insert_elapse bigint 最大insert的时间花费(单位:微秒)。 min_insert_elapse bigint 最小insert的时间花费(单位:微秒)。 total_delete_elapse bigint 总delete的时间花费(单位:微秒)。 avg_delete_elapse bigint 平均delete的时间花费(单位:微秒)。 max_delete_elapse bigint 最大delete的时间花费(单位:微秒)。 min_delete_elapse bigint 最小delete的时间花费(单位:微秒)。 父主题: Query
  • STATEMENT 获得当前节点的执行语句(归一化SQL)的信息。CN上可以看到此CN接收到的归一化的SQL的全量统计信息(包含DN);DN上仅可看到归一化的SQL的此节点执行的统计信息。 不同的savepoint_name所生成的unique_sql_id不同,大量使用savepoint_name时会导致系统中产生的unique_sql_id信息快速上涨,若unique_sql_id数量高于instr_unique_sql_count数量时,新产生的unique_sql_id信息将不被统计。 表1 STATEMENT字段 名称 类型 描述 node_name name 节点名称。 node_id integer 节点的ID(pgxc_node中的node_id)。 user_name name 用户名称。 user_id oid 用户OID。 unique_sql_id bigint 归一化的SQL ID。 query text 归一化的SQL。 备注:长度受track_activity_query_size控制。 n_calls bigint 调用次数。 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 buffer的块访问次数。 n_blocks_hit bigint buffer的块命中次数。 n_soft_parse bigint 软解析次数, n_soft_parse + n_hard_parse可能大于n_calls, 因为子查询未计入n_calls。 n_hard_parse bigint 硬解析次数, n_soft_parse + n_hard_parse可能大于n_calls, 因为子查询未计入n_calls。 db_time bigint 有效的DB时间花费,多线程将累加(单位:微秒)。 cpu_time bigint CPU时间(单位:微秒)。 execution_time bigint 执行器内执行时间(单位:微秒)。 parse_time bigint SQL解析时间(单位:微秒)。 plan_time bigint SQL生成计划时间(单位:微秒)。 rewrite_time bigint SQL重写时间(单位:微秒)。 pl_execution_time bigint plpgsql上的执行时间(单位:微秒)。 pl_compilation_time bigint plpgsql上的编译时间(单位:微秒)。 data_io_time bigint IO上的时间花费(单位:微秒)。 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_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。 n_calls表示实际调用次数,对于存储过程内的fetch语句,fetch语句的实际触发次数,对应该cursor实际执行的语句的n_calls的增加次数。 父主题: Query
  • STATEMENT 获得当前节点的执行语句(归一化SQL)的信息。数据库主节点上可以看到此数据库主节点接收到的归一化的SQL的全量统计信息(包含数据库节点);数据库节点上仅可看到归一化的SQL的此节点执行的统计信息。 不同的savepoint_name所生成的unique_sql_id不同,大量使用savepoint_name时会导致系统中产生的unique_sql_id信息快速上涨,若unique_sql_id数量高于instr_unique_sql_count数量时,新产生的unique_sql_id信息将不被统计。 表1 STATEMENT字段 名称 类型 描述 node_name name 数据库进程名称。 node_id integer 节点的ID。 user_name name 用户名称。 user_id oid 用户OID。 unique_sql_id bigint 归一化的SQL ID。 query text 归一化的SQL。 备注:长度受track_activity_query_size控制。 n_calls bigint 调用次数。 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 buffer的块访问次数。 n_blocks_hit bigint buffer的块命中次数。 n_soft_parse bigint 软解析次数,n_soft_parse + n_hard_parse可能大于n_calls,因为子查询未计入n_calls。 n_hard_parse bigint 硬解析次数,n_soft_parse + n_hard_parse可能大于n_calls,因为子查询未计入n_calls。 db_time bigint 有效的DB时间花费,多线程将累加(单位:微秒)。 cpu_time bigint CPU时间(单位:微秒)。 execution_time bigint 执行器内执行时间(单位:微秒)。 parse_time bigint SQL解析时间(单位:微秒)。 plan_time bigint SQL生成计划时间(单位:微秒)。 rewrite_time bigint SQL重写时间(单位:微秒)。 pl_execution_time bigint plpgsql上的执行时间(单位:微秒)。 pl_compilation_time bigint plpgsql上的编译时间(单位:微秒)。 data_io_time bigint IO上的时间花费(单位:微秒)。 net_send_info text 通过物理连接发送消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_recv_info text 通过物理连接接收消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_stream_send_info text 通过逻辑连接发送消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_stream_recv_info text 通过逻辑连接接收消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 last_updated timestamp with time zone 最后一次更新该语句的时间。 sort_count bigint 排序执行的次数。 sort_time bigint 排序执行的时间(单位:微秒)。 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。 n_calls表示实际调用次数,对于存储过程内的fetch语句,fetch语句的实际触发次数,对应该cursor实际执行的语句的n_calls的增加次数。 父主题: Query
  • STATEMENT_WLMSTAT_COMPLEX_RUNTIME STATEMENT_WLMSTAT_COMPLEX_RUNTIME视图显示和当前用户执行作业正在运行时的负载管理(当前特性是实验室特性,使用时请联系华为技术工程师提供技术支持。)相关信息。 表1 STATEMENT_WLMSTAT_COMPLEX_RUNTIME字段 名称 类型 描述 datid oid 连接后端的数据库OID。 datname name 连接后端的数据库名称。 threadid bigint 后端线程ID。 processid integer 后端线程的pid。 usesysid oid 登录后端的用户OID。 appname text 连接到后端的应用名。 usename name 登录到该后端的用户名。 priority bigint 语句所在Cgroups的优先级。 attribute text 语句的属性: Ordinary:语句发送到数据库后被解析前的默认属性。 Simple:简单语句。 Complicated:复杂语句。 Internal:数据库内部语句。 block_time bigint 语句当前为止的pending的时间,单位s。 elapsed_time bigint 语句当前为止的实际执行时间,单位s。 total_cpu_time bigint 语句在上一时间周期内的DN上CPU使用的总时间,单位s。 cpu_skew_percent integer 语句在上一时间周期内的DN上CPU使用的倾斜率。 statement_mem integer 语句执行使用的statement_mem,预留字段。 active_points integer 语句占用的资源池并发点数。 dop_value integer 语句的从资源池中获取的dop值。 control_group text 语句当前所使用的Cgroups。 status text 语句当前的状态,包括: pending:执行前状态。 running:执行进行状态。 finished:执行正常结束。(当enqueue字段为StoredProc或Transaction时,仅代表语句中的部分作业已经执行完毕,该状态会持续到该语句完全执行完毕。) aborted:执行异常终止。 active:非以上四种状态外的正常状态。 unknown:未知状态。 enqueue text 语句当前的排队情况,包括: Global:在全局队列中排队。 Respool:在资源池队列中排队。 CentralQueue:在中心协调节点(CCN)中排队。 Transaction:语句处于一个事务块中。 StoredProc:句处于一个存储过程中。 None:未在排队。 Forced None:事务块语句或存储过程语句由于超出设定的等待时间而强制执行。 resource_pool name 语句当前所在的资源池。 query text 该后端的最新查询。如果state状态是active(活的),此字段显示当前正在执行的查询。所有其他情况表示上一个查询。 is_plana boolean 逻辑集群(当前特性是实验室特性,使用时请联系华为技术工程师提供技术支持。)模式下,语句当前是否占用其他逻辑集群的资源执行。该值默认为f(否)。 node_group text 语句所属用户对应的逻辑集群(当前特性是实验室特性,使用时请联系华为技术工程师提供技术支持。)。 父主题: Query
  • STATEMENT 获得当前节点的执行语句(归一化SQL)的信息。数据库主节点上可以看到此数据库主节点接收到的归一化的SQL的全量统计信息(包含数据库节点);数据库节点上仅可看到归一化的SQL的此节点执行的统计信息。 不同的savepoint_name所生成的unique_sql_id不同,大量使用savepoint_name时会导致系统中产生的unique_sql_id信息快速上涨,若unique_sql_id数量高于instr_unique_sql_count数量时,新产生的unique_sql_id信息将不被统计。 表1 STATEMENT字段 名称 类型 描述 node_name name 数据库进程名称。 node_id integer 节点的ID。 user_name name 用户名称。 user_id oid 用户OID。 unique_sql_id bigint 归一化的SQL ID。 query text 归一化的SQL。 备注:长度受track_activity_query_size控制。 n_calls bigint 调用次数。 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 buffer的块访问次数。 n_blocks_hit bigint buffer的块命中次数。 n_soft_parse bigint 软解析次数,n_soft_parse + n_hard_parse可能大于n_calls,因为子查询未计入n_calls。 n_hard_parse bigint 硬解析次数,n_soft_parse + n_hard_parse可能大于n_calls,因为子查询未计入n_calls。 db_time bigint 有效的DB时间花费,多线程将累加(单位:微秒)。 cpu_time bigint CPU时间(单位:微秒)。 execution_time bigint 执行器内执行时间(单位:微秒)。 parse_time bigint SQL解析时间(单位:微秒)。 plan_time bigint SQL生成计划时间(单位:微秒)。 rewrite_time bigint SQL重写时间(单位:微秒)。 pl_execution_time bigint plpgsql上的执行时间(单位:微秒)。 pl_compilation_time bigint plpgsql上的编译时间(单位:微秒)。 data_io_time bigint IO上的时间花费(单位:微秒)。 net_send_info text 通过物理连接发送消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_recv_info text 通过物理连接接收消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_stream_send_info text 通过逻辑连接发送消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_stream_recv_info text 通过逻辑连接接收消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 last_updated timestamp with time zone 最后一次更新该语句的时间。 sort_count bigint 排序执行的次数。 sort_time bigint 排序执行的时间(单位:微秒)。 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。 n_calls表示实际调用次数,对于存储过程内的fetch语句,fetch语句的实际触发次数,对应该cursor实际执行的语句的n_calls的增加次数。 父主题: Query
  • GLOBAL_STATEMENT_COUNT 显示数据库各节点当前时刻执行的五类语句(SELECT、INSERT、UPDATE、DELETE、MERGE INTO)和(DDL、DML、DCL)统计信息。 表1 GLOBAL_STATEMENT_COUNT字段 名称 类型 描述 node_name text 节点名称。 user_name text 用户名。 select_count bigint select语句统计结果。 update_count bigint update语句统计结果。 insert_count bigint insert语句统计结果。 delete_count bigint delete语句统计结果。 mergeinto_count bigint merge into语句统计结果。 ddl_count bigint DDL语句的数量。 dml_count bigint DML语句的数量。 dcl_count bigint DCL语句的数量。 total_select_elapse bigint 总select的时间花费(单位:微秒)。 avg_select_elapse bigint 平均select的时间花费(单位:微秒)。 max_select_elapse bigint 最大select的时间花费(单位:微秒)。 min_select_elapse bigint 最小select的时间花费(单位:微秒)。 total_update_elapse bigint 总update的时间花费(单位:微秒)。 avg_update_elapse bigint 平均update的时间花费(单位:微秒)。 max_update_elapse bigint 最大update的时间花费(单位:微秒)。 min_update_elapse bigint 最小update的时间花费(单位:微秒)。 total_insert_elapse bigint 总insert的时间花费(单位:微秒)。 avg_insert_elapse bigint 平均insert的时间花费(单位:微秒)。 max_insert_elapse bigint 最大insert的时间花费(单位:微秒)。 min_insert_elapse bigint 最小insert的时间花费(单位:微秒)。 total_delete_elapse bigint 总delete的时间花费(单位:微秒)。 avg_delete_elapse bigint 平均delete的时间花费(单位:微秒)。 max_delete_elapse bigint 最大delete的时间花费(单位:微秒)。 min_delete_elapse bigint 最小delete的时间花费(单位:微秒)。 父主题: Query