SET RESOURCE GROUP group_name [FOR thread_id [, thread_id] ...]
SET RESOURCE GROUP is used for
resource group management (see
Section 5.1.16, “Resource Groups”). This statement assigns
threads to a resource group. It requires the
group_name identifies which resource
group to be assigned. Any
values indicate threads to assign to the group. Thread IDs can
be determined from the Performance Schema
threads table. If the resource
group or any named thread ID does not exist, an error occurs.
FOR clause, the statement assigns the
current thread for the session to the resource group.
FOR clause that names thread IDs, the
statement assigns those threads to the resource group.
For attempts to assign a system thread to a user resource group or a user thread to a system resource group, a warning occurs.
Assign the current session thread to a group:
SET RESOURCE GROUP rg1;
Assign the named threads to a group:
SET RESOURCE GROUP rg2 FOR 14, 78, 4;
Resource group management is local to the server on which it
SET RESOURCE GROUP
statements are not written to the binary log and are not