云服务器内容精选

  • 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_COUNT 显示数据库各节点执行的五类语句(SELECT、INSERT、UPDATE、DELETE、MERGE INTO)和(DDL、DML、DCL)的汇总统计信息。 表1 SUMMARY_STATEMENT_COUNT字段 名称 类型 描述 user_name text 用户名。 select_count numeric select语句统计结果。 update_count numeric update语句统计结果。 insert_count numeric insert语句统计结果。 delete_count numeric delete语句统计结果。 mergeinto_count numeric merge into语句统计结果。 ddl_count numeric DDL语句的数量。 dml_count numeric DML语句的数量。 dcl_count numeric DCL语句的数量。 total_select_elapse numeric 总select的时间花费(单位:微秒)。 avg_select_elapse bigint 平均select的时间花费(单位:微秒)。 max_select_elapse bigint 最大select的时间花费(单位:微秒)。 min_select_elapse bigint 最小select的时间花费(单位:微秒)。 total_update_elapse numeric 总update的时间花费(单位:微秒)。 avg_update_elapse bigint 平均update的时间花费(单位:微秒)。 max_update_elapse bigint 最大update的时间花费(单位:微秒)。 min_update_elapse bigint 最小update的时间花费(单位:微秒)。 total_insert_elapse numeric 总insert的时间花费(单位:微秒)。 avg_insert_elapse bigint 平均insert的时间花费(单位:微秒)。 max_insert_elapse bigint 最大insert的时间花费(单位:微秒)。 min_insert_elapse bigint 最小insert的时间花费(单位:微秒)。 total_delete_elapse numeric 总delete的时间花费(单位:微秒)。 avg_delete_elapse bigint 平均delete的时间花费(单位:微秒)。 max_delete_elapse bigint 最大delete的时间花费(单位:微秒)。 min_delete_elapse bigint 最小delete的时间花费(单位:微秒)。 父主题: 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视图仅能看到该用户当前节点的统计信息;管理员权限用户查询STATEMENT_COUNT视图则能看到所有用户当前节点的统计信息。当集群或该节点重启时,计数将清零,并重新开始计数。计数以节点收到的查询数为准,包括集群内部进行的查询。例如,CN收到一条查询,如果一条查询语句包含多个子查询,这些子查询内容下发到DN时会被分别计数(无论单个DN还是多个DN)。 表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_HISTORY 获得当前节点的执行语句的信息。查询视图必须具有sysadmin权限或者monitor admin权限。只可在系统库中查询到结果,用户库中无法查询。 表1 STATEMENT_HISTORY字段 名称 类型 描述 dbname name 数据库名称。 schemaname name schema名称。 origin_node integer 节点名称。 user_name name 用户名。 application_name text 用户发起的请求的应用程序名称。 client_addr text 用户发起的请求的客户端地址。 client_port integer 用户发起的请求的客户端端口。 unique_query_id bigint 归一化SQL ID。 debug_query_id bigint 唯一SQL ID。 query text 归一化SQL(仅CN上有值)。 start_time timestamp with time zone 语句启动的时间。 finish_time timestamp with time zone 语句结束的时间。 slow_sql_threshold bigint 语句执行时慢SQL的标准。 transaction_id bigint 事务ID。 thread_id bigint 执行线程ID。 session_id bigint 用户session id。 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。 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 buffer的块访问次数。 n_blocks_hit bigint buffer的块命中次数。 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}。 lock_count bigint 加锁次数。 lock_time bigint 加锁耗时。 lock_wait_count bigint 加锁等待次数。 lock_wait_time bigint 加锁等待耗时。 lock_max_count bigint 最大持锁数量。 lwlock_count bigint 轻量级加锁次数(预留)。 lwlock_wait_count bigint 轻量级等锁次数。 lwlock_time bigint 轻量级加锁时间(预留)。 lwlock_wait_time bigint 轻量级等锁时间。 details bytea 语句锁事件的列表,该列表按时间顺序记录事件,记录的数量受参数track_stmt_details_size的影响, 该字段为二进制,需要借助解析函数pg_catalog.statement_detail_decode读取,见(其它函数) 事件包括: 加锁开始 加锁结束 等锁开始 等锁结束 放锁开始 放锁结束 轻量级等锁开始 轻量级等锁结束 is_slow_sql boolean 该SQL是否为slow SQL。 trace_id text 驱动传入的trace id,与应用的一次请求相关联。 advise text 可能导致该SQL为slow SQL的风险信息(可能同时存在多种风险)。 Cast Function Cause Index Miss. :表示存在隐式转换导致索引匹配失败的风险。 Limit too much rows. :表示存在limit值过大导致SQL变慢的风险。 Proleakproof of function is false. :表示函数的proleakproof值为false,此时函数在生成计划时因存在数据泄露的风险而不会使用统计信息,影响生成计划的准确性,从而存在SQL变慢的风险。 父主题: 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 用户语句。 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 缓存加载次数。 n_blocks_hit bigint 缓存命中数。 db_time bigint 有效的数据库时间花费,多线程将累加(单位:微秒)。 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 I/O上的时间花费(单位:微秒)。 父主题: Query
  • STATEMENT 获得当前节点的执行语句(归一化SQL)的信息。查询视图必须具有sysadmin权限或者monitor admin权限。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 逻辑读次数。 n_blocks_hit bigint 内存中命中次数。 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 有效的数据库内部时间花费,多线程将累加(单位:微秒)。 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)。 父主题: Query
  • STATEMENT 获得当前节点的执行语句(归一化SQL)的信息。查询视图必须具有sysadmin权限或者monitor admin权限。数据库主节点上可以看到此数据库主节点接收到的归一化的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 逻辑读次数。 n_blocks_hit bigint 内存中命中次数。 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 有效的数据库内部时间花费,多线程将累加(单位:微秒)。 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 通过物理连接发送消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_recv_info text 通过物理连接接收消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_stream_send_info text 通过逻辑连接发送消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 net_stream_recv_info text 通过逻辑连接接收消息的网络状态,包含时间(微秒)、调用次数、吞吐量(字节)。单机模式下不支持该字段。 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)。 last_updated timestamp with time zone 最后一次更新该语句的时间。 父主题: 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 用户语句。 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 缓存加载次数。 n_blocks_hit bigint 缓存命中数。 db_time bigint 有效的数据库时间花费,多线程将累加(单位:微秒)。 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 I/O上的时间花费(单位:微秒)。 父主题: Query
  • GLOBAL_STATEMENT_COMPLEX_HISTORY_TABLE 显示各个节点执行作业结束后的负载管理记录。此数据是从内核中转储到系统表中的数据。当设置GUC参数enable_resource_record为on时,系统会定时(周期为3分钟)将GLOBAL_STATEMENT_COMPLEX_HISTORY中的记录导入此系统表,开启此功能会占用系统存储空间并对性能有一定影响,不建议用户使用。具体的字段请参考GLOBAL_STATEMENT_COMPLEX_HISTORY中的字段。 父主题: Query
  • STATEMENT_COMPLEX_RUNTIME STATEMENT_COMPLEX_RUNTIME视图显示当前用户在数据库主节点上正在执行的作业的负载管理记录,如表1所示。 表1 STATEMENT_COMPLEX_RUNTIME的字段 名称 类型 描述 datid oid 连接后端的数据OID。 dbname name 连接后端的数据库名称。 schemaname text 模式的名称。 nodename text 数据库进程名称 username name 连接到后端的用户名。 application_name text 连接到后端的应用名。 client_addr inet 连接到后端的客户端的IP地址。 如果此字段是null,它表明通过服务器机器上UNIX套接字连接客户端或者这是内部线程,如autovacuum。 client_hostname text 客户端的主机名,这个字段是通过client_addr的反向DNS查找得到。这个字段只有在启动log_hostname且使用IP连接时才非空。 client_port integer 客户端用于与后端通讯的TCP端口号,如果使用UNIX套接字,则为-1。 query_band text 用于标示作业类型,可通过GUC参数query_band进行设置,默认为空字符串。 pid bigint 后端线程id。 block_time bigint 语句执行前的阻塞时间,单位ms。 start_time timestamp with time zone 语句执行的开始时间。 duration bigint 语句已经执行的时间,单位ms。 estimate_total_time bigint 语句执行预估总时间,单位ms。 estimate_left_time bigint 语句执行预估剩余时间,单位ms。 resource_pool name 用户使用的资源池。 control_group text 语句所使用的Cgroup。 estimate_memory integer 语句预估使用内存,单位MB。 min_peak_memory integer 语句在数据库节点上的最小内存峰值,单位MB。 max_peak_memory integer 语句在数据库节点上的最大内存峰值,单位MB。 average_peak_memory integer 语句执行过程中的内存使用平均值,单位MB。 memory_skew_percent integer 语句在数据库节点间的内存使用倾斜率。 spill_info text 语句在数据库节点上的下盘信息: None:数据库节点均未下盘。 All:数据库节点均下盘。 [a:b]:数量为b个数据库节点中有a个数据库节点下盘。 min_spill_size integer 若发生下盘,数据库节点上下盘的最小数据量,单位MB,默认为0。 max_spill_size integer 若发生下盘,数据库节点上下盘的最大数据量,单位MB,默认为0。 average_spill_size integer 若发生下盘,数据库节点上下盘的平均数据量,单位MB,默认为0。 spill_skew_percent integer 若发生下盘,数据库节点间下盘倾斜率。 min_dn_time bigint 语句在数据库节点上的最小执行时间,单位ms。 max_dn_time bigint 语句在数据库节点上的最大执行时间,单位ms。 average_dn_time bigint 语句在数据库节点上的平均执行时间,单位ms。 dntime_skew_percent integer 语句在数据库节点的执行时间倾斜率。 min_cpu_time bigint 语句在数据库节点上的最小CPU时间,单位ms。 max_cpu_time bigint 语句在数据库节点上的最大CPU时间,单位ms。 total_cpu_time bigint 语句在数据库节点上的CPU总时间,单位ms。 cpu_skew_percent integer 语句在数据库节点间的CPU时间倾斜率。 min_peak_iops integer 语句在数据库节点上的每秒最小I/O峰值(单位是万次/s)。 max_peak_iops integer 语句在数据库节点上的每秒最大I/O峰值(单位是万次/s)。 average_peak_iops integer 语句在数据库节点上的每秒平均I/O峰值(单位是万次/s)。 iops_skew_percent integer 语句在数据库节点间的I/O倾斜率。 warning text 主要显示如下几类告警信息: Spill file size large than 256MB Broadcast size large than 100MB Early spill Spill times is greater than 3 Spill on memory adaptive Hash table conflict queryid bigint 语句执行使用的内部query id。 query text 正在执行的语句。 query_plan text 语句的执行计划。 node_group text 语句所属用户对应的逻辑数据库。 top_cpu_dn text CPU使用量topN信息。 top_mem_dn text 内存使用量topN信息。 父主题: Query