Was this helpful?
Workload Queues
A queue is a group of database sessions that are running or waiting to run queries. Each queue has its own set of guidelines that decide whether sessions can run queries (or if they need to wait for resources or other conditions to be met).
The database administrator can create an empty queue, assign it a name, and specify restrictions or limits regarding what queries can use this queue. As users run queries, the queries are added into available queues for execution based on queue constraints and availability. When a queue exceeds any of its restrictions or usage limits, it will stop allowing queries to be executed until queries complete and usage drops below the specified limit. If a queue is not able to execute new queries, then any new sessions (queries) assigned to the queue will wait in the queue wait list for execution.
Similar to how aircraft seating is assigned, a queue’s wait list has priority sections:
Critical
High
Medium
Low
When a queue can run another query, a query is taken off the front of the critical priority wait list. If no critical queries are waiting, a query is taken off the front of the high priority wait list (and so forth).
When a user, group, or role is granted authorization to use a queue, the user, group, or role is also assigned a wait list priority. When the user runs a query that needs to wait in the wait list, the query is added to the end of that user’s “wait list priority” wait list. This allows queries that belong to higher priority users to run earlier.
There is one exception: If Session A stalls waiting for a lock, and Session B, which owns the lock, is on a queue wait list, then Session B will be automatically “woken up” and allowed to run until the session releases the lock. This is necessary to avoid internal deadlocking.
Last modified date: 03/21/2024