paging copr cannot hit copr cache
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
1. load tpcc 1000 warehouse(tiup br:v7.1.0 restore db --db=tpcc --pd 127.0.0.1:13425 --storage s3://benchmark/ch-1k-v5 --s3.endpoint http://minio.pingcap.net:9000 --send-credentials-to-tikv=true --check-requirements=false)
2. enable paging and run sql multiple times:
```
set @@tidb_enable_paging=on;
explain analyze select /*+ use_index(orders,idx_order) */ * from orders where o_w_id > 1 and o_d_id > 1 and o_c_id > 10 limit 10000;
```
3. disable paging and run sql multiple times:
```
set @@tidb_enable_paging=on;
explain analyze select /*+ use_index(orders,idx_order) */ * from orders where o_w_id > 1 and o_d_id > 1 and o_c_id > 10 limit 10000;
```
### 2. What did you expect to see? (Required)
copr cache always hit
### 3. What did you see instead (Required)
copr cache not hit when paging is enabled:

and copr cache is hit when paging is disabled:

### 4. What is your TiDB version? (Required)
```
MySQL [tpcc]> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.6.0-alpha-194-g0f978e9
Edition: Community
Git Commit Hash: 0f978e9849fb122077f9f7a57ea25142bd4f4107
Git Branch: debug_coprcache
UTC Build Time: 2023-12-06 13:06:44
GoVersion: go1.21.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.038 sec)
```
Contributor guide
Assessment
This issue has not been assessed yet.