<@U0A71G31CDV> Want to check if I have queueing of...
# questions-and-troubleshooting
r
@Rocky Want to check if I have queueing of query enabled globally and at resource group level - help me with sql queries to check that.
r
To check if query queuing is enabled and how it's configured, you can use the following SQL queries to inspect the system variables and resource group definitions. 1. Check Global Query Queuing Global queuing is controlled by several session variables. Use these queries to check the current status:
Copy code
sql
-- Check if queuing is enabled for SELECTs, Loads, or Stats queries
SHOW VARIABLES LIKE '%enable_query_queue%';

-- Check global threshold configurations (concurrency, memory, cpu limits)
SHOW VARIABLES LIKE 'query_queue_%';
Key variables to look for: * `enable_query_queue_select`: Whether queuing is enabled for SELECT queries. * `query_queue_concurrency_limit`: The global concurrency threshold. If set to
0
, this specific trigger is disabled. * `query_queue_max_queued_queries`: The maximum number of queries allowed in the global queue before new ones are rejected. ────────── 2. Check Resource Group-Level Queuing From v3.1.4 onwards, StarRocks supports queuing at the resource group level. This allows queries to wait in a queue specific to their group rather than failing immediately when group limits are hit. Step 1: Check if group-level queuing is enabled globally
Copy code
sql
SHOW VARIABLES LIKE 'enable_group_level_query_queue';
Step 2: Check resource group definitions To see the specific limits (like
concurrency_limit
) set for each group, run:
Copy code
sql
SHOW RESOURCE GROUPS;
Look for the
concurrency_limit
and
max_cpu_cores
columns. If these are greater than
0
and
enable_group_level_query_queue
is
true
, queries exceeding these limits will be queued. ────────── 3. Monitor Real-time Queuing If you want to see if queries are currently being queued, you can use:
Copy code
sql
-- View resource usage and see if any groups are currently hitting limits
SHOW USAGE RESOURCE GROUPS;

-- View all currently running and queued queries
SHOW PROCESSLIST;
In
SHOW PROCESSLIST
, look for queries with a state like
Pending
or specifically indicating they are in a queue. Summary of Requirements * Global Queuing: Requires
enable_query_queue_select
(or `load`/`statistic`) to be
true
. * Resource Group Queuing: Requires
enable_group_level_query_queue
to be
true
(v3.1.4+) AND a
concurrency_limit
to be set on the resource group. resource-be defined on the resource group. Referencesadministration/management/resource_management/resource_group.mdfaq/resource_isolation_faq.mdadministration/management/monitoring/metrics.mdadministration/management/resource_management/query_queues.md