tidb version:
5.3.0
查询的sql:
SELECT
*
FROM
pay_iap_receipt_detail
WHERE
createTime < '2022-03-30 14:52:52.986'
AND preOrderFlag IS false
AND exchangeFlag IS false
LIMIT
1000;
id task estRows operator info actRows execution info memory disk
Limit_9 root 1000 offset:0, count:1000 1000 time:4.02s, loops:2 N/A N/A
└─IndexLookUp_18 root 1000 1000 time:4.02s, loops:1, index_task: {total_time: 34.5s, fetch_handle: 171.2ms, build: 119.8µs, wait: 34.3s}, table_task: {total_time: 1h0m25.7s, num: 15, concurrency: 5} 26.4 GB N/A
├─IndexRangeScan_14 cop[tikv] 1000 table:pay_iap_receipt_detail, index:idx_create_time(createTime), range:[-inf,2022-03-30 14:52:53), keep order:false 1145764 time:15.5ms, loops:252, cop_task: {num: 1, max: 2.43ms, proc_keys: 0, rpc_num: 1, rpc_time: 2.38ms, copr_cache_hit_ratio: 1.00}, tikv_task:{time:769ms, loops:1123} N/A N/A
└─Limit_17 cop[tikv] 1000 offset:0, count:1000 237536 time:59m10s, loops:247, cop_task: {num: 1417, max: 1m32s, min: 5.68ms, avg: 2.55s, p95: 11.7s, max_proc_keys: 520, p95_proc_keys: 404, tot_proc: 2m50.1s, tot_wait: 1.5s, rpc_num: 1578, rpc_time: 1h42m56.2s, copr_cache_hit_ratio: 0.00}, backoff{tikvRPC: 57s, pdRPC: 1.28s, regionMiss: 946ms}, tikv_task:{proc max:237ms, min:0s, p80:97ms, p95:148ms, iters:3944, tasks:1417}, scan_detail: {total_process_keys: 237536, total_process_keys_size: 25185374639, total_keys: 244848, rocksdb: {delete_skipped_count: 26047, key_skipped_count: 22360, block: {cache_hit_count: 1458748, read_count: 149524, read_byte: 1.80 GB}}} N/A N/A
└─Selection_16 cop[tikv] 1000 isfalse(u7pay.pay_iap_receipt_detail.exchangeflag), isfalse(u7pay.pay_iap_receipt_detail.preorderflag) 237536 tikv_task:{proc max:237ms, min:0s, p80:97ms, p95:148ms, iters:3944, tasks:1417} N/A N/A
└─TableRowIDScan_15 cop[tikv] 1000 table:pay_iap_receipt_detail, keep order:false 237536 tikv_task:{proc max:237ms, min:0s, p80:97ms, p95:148ms, iters:3944, tasks:1417} N/A N/A
问题:
上面的sql语句竟然占用26.4GiB的内存,然后我把这条sql语句杀掉,tidb-server内存回收很缓慢,不知道为什么
感觉是不是5.3.0版本的tidb-server内存有泄漏