Checking Resource Queue Activity andStatus
资源队列的目的是在任何给定时间限制系统中活动查询的数量,以避免耗尽系统资源,如内存,CPU和磁盘I / O。 所有数据库用户都被分配到一个资源队列,并且在用户提交的每个语句都可以运行之前,先根据资源队列限制进行评估。 gp_resq_ *系列视图可用于通过各自的资源队列来检查当前提交给系统的语句的状态。 请注意,超级用户发布的语句免于资源排队。
For the resource queues that haveactive workload, this view shows one row for each active statement submittedthrough a resource queue. This view is accessible to all users.
Table 111: gp_resq_activity view
|
|
For the resource queues that haveactive workload, this view shows a summary of queue activity. This view isaccessible to all users.
Table 112: gp_resq_activity_by_queue Column
|
|
gp_resq_priority_statement
该视图显示了当前在Greenplum数据库系统中运行的所有语句的资源队列优先级,会话ID以及其他信息。 所有用户都可以访问该视图。
Table 113: gp_resq_priority_statement view
|
|
gp_resq_role
This view shows the resource queuesassociated with a role. This view is accessible to all users. Table 114:gp_resq_role view
Column | 描述 |
rrrolname | 角色(用户)名称。 |
rrrsqname | 分配给此角色的资源队列名称。 如果某个角色没有明确分配给资源队列,则该角色将处于默认资源队列(pg_default)中。 |
|
gp_resqueue_status
此视图允许管理员查看工作负载管理资源队列的状态和活动。 它显示了有多少查询正在等待运行,以及在特定的资源队列中当前有多少查询在系统中处于活动状态。
Table 115:gp_resqueue_status view
Column | 描述 |
queueid | 资源队列的ID。 |
rsqname | 资源队列的名称。 |
rsqcountlimit | 资源队列的活动查询阈值。 值-1意味着没有限制。 |
rsqcountvalue | 资源队列中当前正在使用的活动查询槽的数量。 |
rsqcostlimit | 资源队列的查询成本阈值。 值-1意味着没有限制。 |
rsqcostvalue | 当前在资源队列中的所有语句的总成本。 |
rsqmemorylimit | 资源队列的内存限制。 |
rsqmemoryvalue | 资源队列中当前所有语句使用的总内存。 |
rsqwaiters | 资源队列中当前正在等待的语句数。 |
rsqholders | 此资源队列中当前在系统上运行的语句的数量。 |