单独查是很快的,现在问题是只要时间间隔达到七个月以上,查询就要几十秒,即使是查20210401-20211101也是一样慢
id task estRows operator info actRows execution info memory disk
Projection_7 root 65.34 yd_194_result.feature_dev_moment.recdate, yd_194_result.feature_dev_moment.aid, yd_194_result.feature_dev_moment.oid, yd_194_result.feature_dev_moment.gameid, yd_194_result.feature_dev_moment.gameid, yd_194_result.feature_dev_moment.osid, yd_194_result.feature_dev_moment.cid, yd_194_result.feature_dev_moment.pt, Column#66, Column#67, Column#68, Column#69, Column#70, Column#71, Column#72, Column#73, Column#74, Column#75, Column#76, Column#77, Column#78, Column#79, Column#80, Column#81, Column#82, Column#83, Column#84, Column#85, Column#86, Column#87, Column#88, Column#89, Column#90, Column#91, Column#92, Column#98, Column#99, Column#100, Column#101, Column#102, Column#103, Column#104, Column#105, Column#106, Column#107, Column#108, Column#109, Column#110, Column#111, Column#112, Column#113, Column#114, Column#115, Column#93, Column#94, Column#95, Column#96, Column#97 24318 time:2.48s, loops:25, Concurrency:OFF 7.65 MB N/A
└─Sort_8 root 65.34 yd_194_result.feature_dev_moment.payment:desc 24318 time:2.47s, loops:25 38.2 MB 0 Bytes
└─Projection_10 root 65.34 yd_194_result.feature_dev_moment.recdate, yd_194_result.feature_dev_moment.aid, yd_194_result.feature_dev_moment.oid, yd_194_result.feature_dev_moment.gameid, yd_194_result.feature_dev_moment.gameid, yd_194_result.feature_dev_moment.osid, yd_194_result.feature_dev_moment.cid, yd_194_result.feature_dev_moment.pt, Column#66, Column#67, Column#68, Column#69, Column#70, Column#71, Column#72, Column#73, Column#74, Column#75, Column#76, Column#77, Column#78, Column#79, Column#80, Column#81, Column#82, Column#83, Column#84, Column#85, Column#86, Column#87, Column#88, Column#89, Column#90, Column#91, Column#92, 0->Column#98, 0->Column#99, 0->Column#100, 0->Column#101, 0->Column#102, 0->Column#103, 0->Column#104, 0->Column#105, 0->Column#106, 0->Column#107, 0->Column#108, 0->Column#109, 0->Column#110, 0->Column#111, 0->Column#112, 0->Column#113, 0->Column#114, 0->Column#115, Column#93, Column#94, Column#95, Column#96, Column#97, yd_194_result.feature_dev_moment.payment 24318 time:2.26s, loops:26, Concurrency:OFF 32.9 MB N/A
└─HashAgg_29 root 65.34 group by:yd_194_result.feature_dev_moment.cid, yd_194_result.feature_dev_moment.cid, yd_194_result.feature_dev_moment.gameid, yd_194_result.feature_dev_moment.pt, yd_194_result.feature_dev_moment.recdate, funcs:sum(Column#236)->Column#66, funcs:sum(Column#237)->Column#67, funcs:sum(Column#238)->Column#68, funcs:sum(Column#239)->Column#69, funcs:sum(Column#240)->Column#70, funcs:sum(Column#241)->Column#71, funcs:sum(Column#242)->Column#72, funcs:sum(Column#243)->Column#73, funcs:sum(Column#244)->Column#74, funcs:sum(Column#245)->Column#75, funcs:sum(Column#246)->Column#76, funcs:sum(Column#247)->Column#77, funcs:sum(Column#248)->Column#78, funcs:sum(Column#249)->Column#79, funcs:sum(Column#250)->Column#80, funcs:sum(Column#251)->Column#81, funcs:sum(Column#252)->Column#82, funcs:sum(Column#253)->Column#83, funcs:sum(Column#254)->Column#84, funcs:sum(Column#255)->Column#85, funcs:sum(Column#256)->Column#86, funcs:sum(Column#257)->Column#87, funcs:sum(Column#258)->Column#88, funcs:sum(Column#259)->Column#89, funcs:sum(Column#260)->Column#90, funcs:sum(Column#261)->Column#91, funcs:sum(Column#262)->Column#92, funcs:sum(Column#263)->Column#93, funcs:sum(Column#264)->Column#94, funcs:sum(Column#265)->Column#95, funcs:sum(Column#266)->Column#96, funcs:sum(Column#267)->Column#97, funcs:firstrow(yd_194_result.feature_dev_moment.recdate)->yd_194_result.feature_dev_moment.recdate, funcs:firstrow(Column#269)->yd_194_result.feature_dev_moment.osid, funcs:firstrow(yd_194_result.feature_dev_moment.gameid)->yd_194_result.feature_dev_moment.gameid, funcs:firstrow(yd_194_result.feature_dev_moment.cid)->yd_194_result.feature_dev_moment.cid, funcs:firstrow(Column#272)->yd_194_result.feature_dev_moment.aid, funcs:firstrow(Column#273)->yd_194_result.feature_dev_moment.oid, funcs:firstrow(yd_194_result.feature_dev_moment.pt)->yd_194_result.feature_dev_moment.pt, funcs:firstrow(Column#275)->yd_194_result.feature_dev_moment.payment 24318 time:2.25s, loops:26, partial_worker:{wall_time:2.057477579s, concurrency:5, task_num:24, tot_wait:9.848699288s, tot_exec:373.551603ms, tot_time:10.244315181s, max:2.057303528s, p95:2.057303528s}, final_worker:{wall_time:2.265677267s, concurrency:5, task_num:25, tot_wait:10.194230485s, tot_exec:1.099307156s, tot_time:11.293589357s, max:2.265470875s, p95:2.265470875s} 88.8 MB N/A
└─IndexLookUp_30 root 65.34 24338 time:2.03s, loops:25, index_task: {total_time: 1.76s, fetch_handle: 752.7ms, build: 103.8µs, wait: 1s}, table_task: {total_time: 6.25s, num: 20, concurrency: 5} 15.7 MB N/A
├─Selection_25 cop[tikv] 302142.09 not(in(yd_194_result.feature_dev_moment.gameid, "1604385436956830", "1621669402391940", "1632711274294320", "1636099609615800", "1639364435557330", "1639126762567720", "1616571507848110", "1639110127366330", "1640159205240000", "1633765571609960")) 329041 time:706.1ms, loops:329, cop_task: {num: 1, max: 701.4ms, proc_keys: 334995, tot_proc: 655ms, tot_wait: 3ms, rpc_num: 1, rpc_time: 701.4ms, copr_cache_hit_ratio: 0.00}, tikv_task:{time:641ms, loops:332}, scan_detail: {total_process_keys: 334995, total_process_keys_size: 47904285, total_keys: 334996, rocksdb: {delete_skipped_count: 0, key_skipped_count: 334995, block: {cache_hit_count: 352, read_count: 0, read_byte: 0 Bytes}}} N/A N/A
│ └─IndexRangeScan_23 cop[tikv] 307792.50 table:v, index:PRIMARY(recdate, osid, gameid, cid, aid, oid, pt, moment), range:[2021-12-01,2021-12-31], keep order:false 334995 tikv_task:{time:495ms, loops:332} N/A N/A
└─HashAgg_12 cop[tikv] 65.34 group by:yd_194_result.feature_dev_moment.cid, yd_194_result.feature_dev_moment.cid, yd_194_result.feature_dev_moment.gameid, yd_194_result.feature_dev_moment.pt, yd_194_result.feature_dev_moment.recdate, funcs:sum(yd_194_result.feature_dev_moment.installcount)->Column#236, funcs:sum(yd_194_result.feature_dev_moment.regdevcount)->Column#237, funcs:sum(yd_194_result.feature_dev_moment.newdevcount)->Column#238, funcs:sum(yd_194_result.feature_dev_moment.newdidrolecount)->Column#239, funcs:sum(yd_194_result.feature_dev_moment.didrolecount)->Column#240, funcs:sum(yd_194_result.feature_dev_moment.reglogincount)->Column#241, funcs:sum(yd_194_result.feature_dev_moment.newlogincount)->Column#242, funcs:sum(yd_194_result.feature_dev_moment.newuserrolecount)->Column#243, funcs:sum(yd_194_result.feature_dev_moment.userrolecount)->Column#244, funcs:sum(yd_194_result.feature_dev_moment.userlive1)->Column#245, funcs:sum(yd_194_result.feature_dev_moment.userlive3)->Column#246, funcs:sum(yd_194_result.feature_dev_moment.userlive4)->Column#247, funcs:sum(yd_194_result.feature_dev_moment.userlive5)->Column#248, funcs:sum(yd_194_result.feature_dev_moment.userlive6)->Column#249, funcs:sum(yd_194_result.feature_dev_moment.userlive7)->Column#250, funcs:sum(yd_194_result.feature_dev_moment.userlive8)->Column#251, funcs:sum(yd_194_result.feature_dev_moment.userlive9)->Column#252, funcs:sum(yd_194_result.feature_dev_moment.userlive10)->Column#253, funcs:sum(yd_194_result.feature_dev_moment.userlive11)->Column#254, funcs:sum(yd_194_result.feature_dev_moment.userlive12)->Column#255, funcs:sum(yd_194_result.feature_dev_moment.userlive13)->Column#256, funcs:sum(yd_194_result.feature_dev_moment.userlive14)->Column#257, funcs:sum(yd_194_result.feature_dev_moment.userlive15)->Column#258, funcs:sum(yd_194_result.feature_dev_moment.userlive16)->Column#259, funcs:sum(yd_194_result.feature_dev_moment.userlive30)->Column#260, funcs:sum(yd_194_result.feature_dev_moment.userlive60)->Column#261, funcs:sum(yd_194_result.feature_dev_moment.userlive90)->Column#262, funcs:sum(yd_194_result.feature_dev_moment.newuserincome)->Column#263, funcs:sum(yd_194_result.feature_dev_moment.newuserpaypeople)->Column#264, funcs:sum(yd_194_result.feature_dev_moment.todayincome)->Column#265, funcs:sum(yd_194_result.feature_dev_moment.todaypaypeople)->Column#266, funcs:sum(yd_194_result.feature_dev_moment.todaypay6people)->Column#267, funcs:firstrow(yd_194_result.feature_dev_moment.osid)->Column#269, funcs:firstrow(yd_194_result.feature_dev_moment.aid)->Column#272, funcs:firstrow(yd_194_result.feature_dev_moment.oid)->Column#273, funcs:firstrow(yd_194_result.feature_dev_moment.payment)->Column#275 24338 time:6.02s, loops:42, cop_task: {num: 22, max: 525.6ms, min: 53.1ms, avg: 280ms, p95: 476.1ms, max_proc_keys: 20946, p95_proc_keys: 20507, tot_proc: 5.74s, tot_wait: 17ms, rpc_num: 43, rpc_time: 12.3s, copr_cache_hit_ratio: 0.00}, tikv_task:{proc max:493ms, min:42ms, p80:391ms, p95:448ms, iters:328, tasks:22}, scan_detail: {total_process_keys: 329041, total_process_keys_size: 161876063, total_keys: 658262, rocksdb: {delete_skipped_count: 0, key_skipped_count: 986945, block: {cache_hit_count: 3891, read_count: 0, read_byte: 0 Bytes}}} N/A N/A
└─TableRowIDScan_24 cop[tikv] 302142.09 table:v, keep order:false 329041 tikv_task:{proc max:205ms, min:17ms, p80:153ms, p95:182ms, iters:328, tasks:22} N/A N/A