This document describes the supported statement scenarios and restricted scenarios of the parallel query.
TencentDB for MySQL has implemented the parallel query feature for SQL statements with the following characteristics, with more to come.
The parallel query feature of TencentDB for MySQL is not supported in the following scenarios.
Restriction | Description |
---|---|
Statement compatibility restriction | Parallel query is not supported for non-query statements, including `INSERT ... SELECT` and `REPLACE ... SELECT`. |
Parallel query is not supported for statements in a stored program. | |
Parallel query is not supported for prepared statements. | |
Parallel query is not supported for statements in serial isolation-level transactions. | |
Parallel query is not supported for locking reads, such as `SELECT FOR UPDATE` and `SELECT ... FOR SHARE`. | |
Parallel query is not supported for CTEs. | |
Table/Index compatibility restriction | Parallel query is not supported for system, temp, and non-InnoDB tables. |
Parallel query is not supported for space index. | |
Parallel query is not supported for full-text index. | |
Parallel query is not supported for partitioned tables. | |
Parallel query is not supported for tables in `index_merge` scan mode. | |
Expression/Field compatibility restriction | Parallel query is not supported for tables containing generated columns or BLOB, TEXT, JSON, BIT, and GEOMETRY fields. |
Parallel query is not supported for aggregate functions of the BIT_AND, BIT_OR, or BIT_XOR type. | |
Parallel query is not supported for DISTINCT aggregations, such as SUM(DISTINCT) and COUNT(DISTINCT). | |
Parallel query is not supported for GIS functions such as SP_WITHIN_FUNC and ST_DISTANCE. | |
Parallel query is not supported for custom functions. | |
Parallel query is not supported for JSON functions such as JSON_LENGTH, JSON_TYPE, and JSON_ARRAYAGG. | |
Parallel query is not supported for XML functions such as XML_STR. | |
Parallel query is not supported for user-lock functions such as IS_FREE_LOCK, IS_USED_LOCK, RELEASE_LOCK, RELEASE_ALL_LOCKS, and GET_LOCK. | |
Parallel query is not supported for SLEEP, RANDOM, GROUP_CONCAT, SET_USER_VAR, and WEIGHT_STRING functions. | |
Parallel query is not supported for certain statistical functions such as STD, STDDEV, STDDEV_POP, VARIANCE, VAR_POP, and VAR_SAMP. | |
Parallel query is not supported for subqueries. | |
Parallel query is not supported for window functions. | |
Parallel query is not supported for ROLLUP. |
Besides the above examples in Supported statement scenarios, you can also check the parallel query execution plan and thread working status to see whether a statement can be queried parallelly. For more information, see Viewing Parallel Query.
Was this page helpful?