This feature pushes LIMIT/OFFSET and SUM operations down to the storage engine InnoDB when querying single tables, effectively reducing query latency.
Select *from tbl Limit 10”, “Select* from tbl Limit 10,2
, and Select sum(c1) from tbl
.Import one million rows of data and test query performance in sysbench:
select * from sbtest1 limit 1000000,1;
decreases from 6.3 to 2.8 seconds.select sum(k) from sbtest1;
decreases from 5.4 to 1.5 seconds.During the execution of an 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/Value Range | 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 ticket for assistance.
Was this page helpful?