tencent cloud

TDSQL-C for MySQL

Service Agreement
Service Level Agreement
Terms of Service
Política TDSQL- C
Política de privacidade
Contrato de segurança e processamento de dados
문서TDSQL-C for MySQL

Computation Pushdown

포커스 모드
폰트 크기
마지막 업데이트 시간: 2023-11-01 16:47:39

Overview

This feature pushes LIMIT/OFFSET and SUM operations down to the storage engine InnoDB when querying single tables, effectively reducing query latency.
When LIMIT/OFFSET is executed using secondary indexes, this feature can avoid using the clustered index values as pointers to find the full table rows, effectively cutting the cost of scanning table data.
This feature pushes SUM operations down to InnoDB. In other words, instead of sending rows to the MySQL server, InnoDB calculates data itself and returns the final result to the MySQL server.

Supported Versions

TDSQL-C for MySQL 5.7 (kernel version 2.0.23/2.1.9) or later.

Use Cases

This feature is mainly used to optimize single-table queries with LIMIT/OFFSET or SUM clauses, such as "Select from tbl Limit 10", "Select from tbl Limit 10,2", and "Select sum(c1) from tbl".
This feature cannot optimize the following queries:
Queries with DISTINCT, GROUP BY, or HAVING clauses
Nested subqueries
Queries with FULLTEXT indexes
Queries with ORDER BY clauses, where the optimizer fails to use indexes to implement ORDER BY
Queries with multi-range read (MRR).
Queries with SQL_CALC_FOUND_ROWS.

Parameter Description

During the execution of a SQL statement, the optimizer automatically modifies the query execution plan to implement computation pushdown according to the following parameters. Parameters are as follows:
Parameter
Effective Immediately
Type
Default Value
Valid Values
Description
‌cdb_enable_offset_pushdown
Yes
bool
ON
‌{ON,OFF}
Enable or disable LIMIT/OFFSET pushdown. It is enabled by default.
‌cdb_enable_sumagg_pushdown
Yes
bool
OFF
‌{ON,OFF}
Enable or disable SUM pushdown. It is disabled by default.
Note:
Currently, you cannot directly modify the values of the above parameters. If needed, submit a ticketfor assistance.


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백