For AI agents: the complete documentation index is at llms.txt. Every page is also available as markdown by appending .md to its URL, or by sending an Accept: text/markdown request header.

ALTER USER SET RESOURCE GROUP reference

Enterprise:

Resource groups isolate competing query workloads inside a single QuestDB instance.

ALTER USER ... SET RESOURCE GROUP places the user's queries under a resource group, which governs their admission, CPU share and memory budget.


Syntax​

ALTER USER userName SET RESOURCE GROUP resourceGroupName;

Description​

A direct mapping on the user beats any mapping it would inherit from an ACL group, whatever that group's priority. That is how you make one person an exception without touching the groups.

MAPPING PRIORITY is not accepted here, because a user has exactly one direct mapping and there is nothing to break a tie between. It belongs to ALTER GROUP SET RESOURCE GROUP.

The statement requires the RESOURCE GROUP ADMIN permission, and affects queries that start after the change rather than one already running.

Examples​

ALTER USER john SET RESOURCE GROUP reporting;

Verify with SHOW USERS, which reports the direct mapping in its resource_group column:

SELECT name, resource_group FROM (SHOW USERS);
nameresource_group
adminnull
johnreporting

To see the group a session actually resolved to, which may come from an ACL group rather than a direct mapping, use current_resource_group().

See also​