O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using resource groups

You can restrict the queries to use only a certain number of system resources using the resource groups. Currently, only CPU time is a manageable resource represented by virtual CPU (VCPU), which includes CPU cores, hyperthreads, hardware threads, and more. You can create a resource group and assign the VCPUs to it. Apart from the CPU, the attribute to the resource group is thread priority.

You can assign a resource group to a thread, set the default resource group at the session level, or pass the resource group as an optimizer hint. For example, you want to run some queries (say, reporting queries) with lowest priority; you can assign them to a resource group that has minimum resources.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required