- 仍然比较慢
- dashboard上的执行计划:(今天的,sql每次要执行20min左右,只能提供相对新鲜的analyze)
PS: i_id为主键。
SELECT CH_ID FROM tb1 ORDER BY I_ID ASC LIMIT 100;
id task estRows operator info actRows execution info memory disk
Projection_7 root 100 db1.tb1.ch_trace_id 100 time:21m44.1s, loops:2, Concurrency:OFF 6.62 KB N/A
└─Limit_12 root 100 offset:0, count:100 100 time:21m44.1s, loops:2 N/A N/A
└─TableReader_25 root 100 data:Limit_24 100 time:21m44.1s, loops:1, cop_task: {num: 14518, max: 459.6ms, min: 285.2µs, avg: 88.5ms, p95: 183.5ms, max_proc_keys: 100, p95_proc_keys: 0, tot_proc: 21m10s, tot_wait: 5.29s, rpc_num: 14518, rpc_time: 21m24s, copr_cache_hit_ratio: 0.12}, backoff{regionMiss: 15.3s} 5.19 KB N/A
└─Limit_24 cop[tikv] 100 offset:0, count:100 100 tikv_task:{proc max:459ms, min:4ms, p80:126ms, p95:188ms, iters:14520, tasks:14518}, scan_detail: {total_process_keys: 100, total_keys: 4875306766, rocksdb: {delete_skipped_count: 3947646, key_skipped_count: 4883560764, block: {cache_hit_count: 124342, read_count: 3390687, read_byte: 16.9 GB}}} N/A N/A
└─TableRangeScan_23 cop[tikv] 100 table:tb1, range:[0,+inf], keep order:true 100 tikv_task:{proc max:459ms, min:4ms, p80:126ms, p95:188ms, iters:14520, tasks:14518}, scan_detail: {total_process_keys: 0, total_keys: 0, rocksdb: {delete_skipped_count: 0, key_skipped_count: 0, block: {cache_hit_count: 0, read_count: 0, read_byte: 0 Bytes}}} N/A N/A