Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 关于tidb_enable_paging参数影响范围的问题
[TiDB Usage Environment] Poc
[TiDB Version] 6.3.0
[Encountered Issue] The parameter explanation does not match the actual situation.
The official documentation explains that this parameter controls whether the IndexLookUp
operator uses paging to send Coprocessor requests. However, in practice, other table read operations such as full table scans are also affected.
To avoid the issue of not knowing the actual cop_task concurrency, set tidb_distsql_scan_concurrency=1 and observe the behavior of explain analyze select * from tpch.orders with tidb_enable_paging=OFF and tidb_enable_paging=ON, as shown below:
It can be seen that after enabling paging, the number of RPCs increased significantly, and memory usage decreased significantly.
Paging starts from tidb_min_paging_size=128, increasing by 10 times each request, up to a maximum of tidb_max_paging_size=50000 rows per request. This ensures efficiency while reducing memory usage as much as possible.
From actual testing, it appears that it not only controls the IndexLookUp
operator’s data fetching behavior. Is the official documentation not comprehensive enough in this explanation?