Skip to main content
Version: current [26.x]

SET QUEUE

Specify the queue that will be used to route subsequent queries in the current session.

When a session queue is set, it overrides Workload Management (WLM) routing rules. The setting remains active until the session ends or until it is explicitly reset using RESET QUEUE. Changing the session queue does not persist across sessions.

Syntax
SET QUEUE <queue_name>

Parameters

<queue_name> String

Specifies the queue to use for routing subsequent queries in the session. The queue must be available. Use the CURRENT_QUEUE() function to return the name of the queue currently in use for the active session.

Examples

Each query run after this command in the same session will be routed to the specified queue
SET QUEUE first_queue;

SELECT CURRENT_QUEUE();