VIEW_RESOURCE_TAG_THREAD_INFO view is used to monitor the status of task queues at the worker thread level in real time. This view displays the task backlog for each worker thread, helping users gain a deep understanding of internal task scheduling and load distribution within the system.Field Name | Type | Description |
attribute | varchar(64) | Business type identifier system: The default group assigned by the system.pq: The business group for PQ (Parallel Query).duckdb: The business group related to the DuckDB engine. |
tag | int unsigned | The unique identifier for internal system grouping, automatically assigned and managed by the system. This is an internal system identifier. Users do not need to pay attention to or modify it. In daily use, identify different groups by the business type name (attribute field). |
thread_id | varchar(64) | The thread identifier for a worker thread. It can be correlated with the thread identifier in logs to facilitate problem troubleshooting. |
rq_size | bigint unsigned | The number of tasks pending in the local queue of the current worker thread. Processing mechanism: The worker thread prioritizes processing tasks in this queue, adopting a Last-In-First-Out (LIFO) policy. |
remote_rq_size | bigint unsigned | The number of tasks pending in the remote queue of the current worker thread. Processing mechanism: 1. The local queue (rq) worker thread always prioritizes processing tasks in its local queue. 2. For its own remote queue (remote_rq), a worker thread starts processing tasks from that remote queue when its local queue is empty. 3. If its own remote queue is also empty, the thread obtains tasks from the remote queues of other worker threads within the same group for processing, achieving load balancing within the group. |
tdsql > SELECT * FROM information_schema.VIEW_RESOURCE_TAG_THREAD_INFO where attribute = 'system' and rq_size <> 0 or remote_rq_size <> 0;+-----------+-----+----------------+---------+----------------+| attribute | tag | thread_id | rq_size | remote_rq_size |+-----------+-----+----------------+---------+----------------+| system | 0 | 0x7f19d47ff700 | 45 | 0 || system | 0 | 0x7f19ac9ff700 | 235 | 1 || system | 0 | 0x7f19a5bfe700 | 128 | 0 || system | 0 | 0x7f19c47fe700 | 78 | 0 || system | 0 | 0x7f19bfbff700 | 115 | 0 |+-----------+-----+----------------+---------+----------------+
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback