{question}
What does workload_management_max_queue_depth do?
{question}
{answer}
The global variable `workload_management_max_queue_depth` defines how many queries can be waiting while the current workload is already maxed out. To view more information about this and other global variables, please consult our documentation.
The default value for the variable is 100. If this value is reached, the error ER_TOO_MANY_QUEUED_QUERIES
is displayed.
The value of the variable should not be set higher than 0.80 * max_connection_threads.
To verify the variable value, you can use:
SELECT @@workload_management_max_queue_depth;
+---------------------------------------+
| @@workload_management_max_queue_depth |
+---------------------------------------+
| 100 |
+---------------------------------------+
1 row in set (0.22 sec)
To change the variable value you can use:
SET GLOBAL workload_management_max_queue_depth=120;
Query OK, 0 rows affected (0.04 sec)
Note: This variable is only used if workload management is enabled in the cluster.
You can read more information about it in our documentation, and all about the engine variables for workload management here.
Make sure that you check if it's enabled in your cluster:
singlestore> SELECT @@workload_management;
+-----------------------+
| @@workload_management |
+-----------------------+
| 1 |
+-----------------------+
1 row in set (0.05 sec)
{answer}