tencent cloud

Feedback

Supported Statement Scenarios and Restricted Scenarios

Last updated: 2024-07-22 12:34:38
    This document describes the supported statement scenarios and restricted scenarios of the parallel query.

    Supported statement scenarios

    TencentDB for MySQL has implemented the parallel query feature for SQL statements with the following characteristics, with more to come.
    Single-table scan: Full-table scan, index scan, index range scan, and index REF query in ascending or descending order are supported.
    Multi-table join: The nested-loop join (NLJ) algorithm as well as semi join, anti join, and outer join are supported.
    Subquery: Parallel query is supported for derived tables.
    Data type: Different data types can be queried, such as integer, string, floating point, time, and overflow (with a runtime size limit).
    There are no restrictions on common operators and functions.
    COUNT, SUM, AVG, MIN, and MAX aggregate functions are supported.
    UNION and UNION ALL queries are supported.
    Traditional (default), JSON, and tree EXPLAIN formats are supported.

    Restricted scenarios

    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.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support