Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](inverted index) fix the issue where need_read_data does not handle non-pushdown conditions #36292

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

zzzxl1993
Copy link
Contributor

…dle non-pushdown conditions

Proposed changes

  1. Fixed the previous optimization of [opt](inverted index) performance optimization for need_read_data in compound #35346 not handling non-pushdown conditions.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@zzzxl1993
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8989/24662)
Line Coverage: 28.03% (73689/262938)
Region Coverage: 27.49% (38269/139198)
Branch Coverage: 24.20% (19517/80658)
Coverage Report: http://coverage.selectdb-in.cc/coverage/75570c3ff5f1f3ed661a42b31f1bc9e9601eb29c_75570c3ff5f1f3ed661a42b31f1bc9e9601eb29c/report/index.html

@doris-robot
Copy link

TPC-H: Total hot run time: 39950 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 75570c3ff5f1f3ed661a42b31f1bc9e9601eb29c, data reload: false

------ Round 1 ----------------------------------
q1	17618	4854	4320	4320
q2	2029	191	211	191
q3	10449	1111	1117	1111
q4	10190	782	847	782
q5	7481	2708	2630	2630
q6	223	138	136	136
q7	973	620	596	596
q8	9226	2070	2113	2070
q9	8787	6527	6472	6472
q10	8846	3709	3752	3709
q11	448	246	258	246
q12	421	237	230	230
q13	18782	2953	2965	2953
q14	274	224	206	206
q15	520	492	494	492
q16	517	385	375	375
q17	984	685	700	685
q18	8031	7522	7472	7472
q19	5960	1434	1412	1412
q20	671	315	315	315
q21	4917	3224	3871	3224
q22	389	331	323	323
Total cold run time: 117736 ms
Total hot run time: 39950 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4401	4240	4192	4192
q2	381	266	262	262
q3	2961	2898	2926	2898
q4	1976	1742	1777	1742
q5	5529	5515	5505	5505
q6	222	134	130	130
q7	2235	1896	1787	1787
q8	3284	3455	3488	3455
q9	8672	8773	8797	8773
q10	4156	3827	3795	3795
q11	601	499	497	497
q12	786	645	644	644
q13	17063	3132	3129	3129
q14	318	285	261	261
q15	526	485	501	485
q16	488	431	438	431
q17	1812	1471	1489	1471
q18	8058	7878	7764	7764
q19	1829	1646	1686	1646
q20	3166	1870	1855	1855
q21	5181	4836	4871	4836
q22	660	520	582	520
Total cold run time: 74305 ms
Total hot run time: 56078 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 170569 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 75570c3ff5f1f3ed661a42b31f1bc9e9601eb29c, data reload: false

query1	927	377	374	374
query2	6440	2536	2363	2363
query3	6646	210	212	210
query4	18986	17256	17150	17150
query5	3607	473	466	466
query6	239	154	158	154
query7	4585	293	290	290
query8	307	282	269	269
query9	8556	2435	2421	2421
query10	553	310	287	287
query11	10568	10140	9987	9987
query12	121	90	83	83
query13	1636	393	358	358
query14	10079	6902	7598	6902
query15	229	196	185	185
query16	7678	269	282	269
query17	1396	548	524	524
query18	1943	269	268	268
query19	192	156	149	149
query20	91	82	83	82
query21	215	130	125	125
query22	4203	4006	4076	4006
query23	33714	33716	33529	33529
query24	11202	2944	2894	2894
query25	602	386	383	383
query26	730	163	159	159
query27	2336	336	328	328
query28	6233	2147	2120	2120
query29	889	651	635	635
query30	263	160	171	160
query31	966	782	744	744
query32	96	51	54	51
query33	756	304	291	291
query34	1060	487	489	487
query35	739	690	657	657
query36	1125	965	963	963
query37	149	73	77	73
query38	2975	2859	2844	2844
query39	920	833	846	833
query40	211	128	131	128
query41	55	50	55	50
query42	114	107	99	99
query43	596	528	570	528
query44	1200	734	743	734
query45	223	169	161	161
query46	1077	716	722	716
query47	1902	1819	1825	1819
query48	363	296	294	294
query49	828	397	407	397
query50	767	374	376	374
query51	6882	6633	6669	6633
query52	99	93	88	88
query53	365	296	288	288
query54	909	450	436	436
query55	73	74	77	74
query56	297	260	265	260
query57	1117	1054	1023	1023
query58	253	230	261	230
query59	3371	3056	3069	3056
query60	288	275	270	270
query61	103	109	117	109
query62	611	441	443	441
query63	318	285	292	285
query64	8634	2263	1726	1726
query65	3182	3074	3091	3074
query66	743	320	329	320
query67	15412	15013	14837	14837
query68	4582	523	525	523
query69	496	350	341	341
query70	1132	1110	1114	1110
query71	409	279	270	270
query72	7126	5569	2748	2748
query73	738	321	319	319
query74	5963	5497	5564	5497
query75	3363	2714	2642	2642
query76	2632	982	861	861
query77	449	291	295	291
query78	10270	9768	9727	9727
query79	2401	514	518	514
query80	1464	470	465	465
query81	571	215	224	215
query82	743	102	106	102
query83	189	163	164	163
query84	272	86	86	86
query85	1281	289	275	275
query86	459	322	320	320
query87	3311	3120	3138	3120
query88	3801	2368	2358	2358
query89	466	376	375	375
query90	1788	194	200	194
query91	130	98	98	98
query92	58	51	49	49
query93	2330	497	499	497
query94	1049	192	185	185
query95	414	327	385	327
query96	596	275	269	269
query97	3220	3051	3038	3038
query98	220	205	200	200
query99	1134	883	867	867
Total cold run time: 267002 ms
Total hot run time: 170569 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.12 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 75570c3ff5f1f3ed661a42b31f1bc9e9601eb29c, data reload: false

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.67	0.07	0.08
query5	0.50	0.47	0.50
query6	1.13	0.74	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.53	0.48	0.50
query10	0.53	0.56	0.54
query11	0.14	0.11	0.11
query12	0.16	0.12	0.12
query13	0.59	0.58	0.60
query14	0.76	0.79	0.76
query15	0.84	0.81	0.82
query16	0.36	0.37	0.35
query17	1.00	1.02	0.98
query18	0.24	0.23	0.26
query19	1.82	1.76	1.82
query20	0.01	0.01	0.00
query21	15.40	0.65	0.64
query22	4.02	6.88	2.31
query23	18.32	1.38	1.30
query24	2.08	0.24	0.20
query25	0.16	0.09	0.08
query26	0.26	0.18	0.18
query27	0.09	0.08	0.07
query28	13.26	1.00	0.99
query29	12.69	3.27	3.23
query30	0.26	0.06	0.07
query31	2.86	0.39	0.39
query32	3.26	0.48	0.47
query33	2.90	2.94	2.89
query34	17.31	4.67	4.62
query35	4.71	4.56	4.49
query36	0.64	0.47	0.47
query37	0.17	0.16	0.15
query38	0.15	0.14	0.14
query39	0.04	0.04	0.03
query40	0.16	0.14	0.14
query41	0.08	0.04	0.04
query42	0.06	0.04	0.04
query43	0.05	0.04	0.04
Total cold run time: 109.63 s
Total hot run time: 31.12 s

@zzzxl1993 zzzxl1993 force-pushed the need_read_data_opt_fix branch from 75570c3 to 28dc01a Compare June 14, 2024 07:00
@zzzxl1993
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8989/24661)
Line Coverage: 28.03% (73697/262934)
Region Coverage: 27.50% (38277/139204)
Branch Coverage: 24.21% (19527/80666)
Coverage Report: http://coverage.selectdb-in.cc/coverage/28dc01ad16f3198a79e9b6d5faed78d8aca47465_28dc01ad16f3198a79e9b6d5faed78d8aca47465/report/index.html

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.44% (8987/24661)
Line Coverage: 28.01% (73666/262957)
Region Coverage: 27.48% (38263/139220)
Branch Coverage: 24.18% (19508/80670)
Coverage Report: http://coverage.selectdb-in.cc/coverage/28dc01ad16f3198a79e9b6d5faed78d8aca47465_28dc01ad16f3198a79e9b6d5faed78d8aca47465/report/index.html

@doris-robot
Copy link

TPC-H: Total hot run time: 39402 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 28dc01ad16f3198a79e9b6d5faed78d8aca47465, data reload: false

------ Round 1 ----------------------------------
q1	17625	4336	4219	4219
q2	2029	186	192	186
q3	10462	1149	1034	1034
q4	10190	732	743	732
q5	7470	2616	2590	2590
q6	221	135	135	135
q7	966	599	592	592
q8	9216	2083	2030	2030
q9	8993	6510	6448	6448
q10	8915	3736	3684	3684
q11	455	234	235	234
q12	523	226	229	226
q13	17756	2957	3000	2957
q14	266	224	234	224
q15	513	484	474	474
q16	522	377	375	375
q17	969	628	701	628
q18	7987	7342	7475	7342
q19	6517	1482	1507	1482
q20	657	334	329	329
q21	4932	3142	3176	3142
q22	396	339	344	339
Total cold run time: 117580 ms
Total hot run time: 39402 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4380	4230	4194	4194
q2	373	274	272	272
q3	2983	2894	2875	2875
q4	2006	1711	1683	1683
q5	5632	5479	5509	5479
q6	231	128	129	128
q7	2166	1870	1865	1865
q8	3261	3391	3394	3391
q9	8667	8693	8885	8693
q10	4095	3867	3694	3694
q11	595	511	490	490
q12	831	631	625	625
q13	16942	3244	3156	3156
q14	310	289	297	289
q15	545	480	489	480
q16	497	441	426	426
q17	1799	1501	1532	1501
q18	8173	7901	7625	7625
q19	1859	1546	1499	1499
q20	3034	1920	1847	1847
q21	5098	4882	4632	4632
q22	715	554	556	554
Total cold run time: 74192 ms
Total hot run time: 55398 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 170570 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 28dc01ad16f3198a79e9b6d5faed78d8aca47465, data reload: false

query1	937	382	393	382
query2	6458	2477	2225	2225
query3	6645	206	203	203
query4	19725	17352	17250	17250
query5	3551	460	444	444
query6	244	163	157	157
query7	4578	294	287	287
query8	333	302	276	276
query9	8447	2402	2391	2391
query10	576	304	284	284
query11	10656	10113	10225	10113
query12	121	88	86	86
query13	1643	375	386	375
query14	9260	7788	6974	6974
query15	228	195	187	187
query16	7741	267	257	257
query17	1911	530	504	504
query18	1950	267	264	264
query19	188	148	150	148
query20	95	82	80	80
query21	209	133	123	123
query22	4393	3988	3889	3889
query23	33636	33662	33719	33662
query24	10902	2979	2856	2856
query25	564	403	362	362
query26	718	156	158	156
query27	2374	326	325	325
query28	6128	2089	2077	2077
query29	891	605	649	605
query30	225	151	154	151
query31	960	765	764	764
query32	98	53	54	53
query33	710	272	275	272
query34	1001	473	459	459
query35	743	675	676	675
query36	1151	981	962	962
query37	149	71	71	71
query38	2965	2850	2860	2850
query39	922	836	820	820
query40	207	131	129	129
query41	60	57	54	54
query42	105	107	105	105
query43	598	593	525	525
query44	1155	728	732	728
query45	202	165	164	164
query46	1074	713	707	707
query47	1902	1776	1804	1776
query48	382	299	291	291
query49	860	433	413	413
query50	774	382	382	382
query51	6788	6697	6670	6670
query52	102	98	94	94
query53	358	286	291	286
query54	886	463	451	451
query55	75	75	72	72
query56	294	264	276	264
query57	1137	1083	1057	1057
query58	261	247	248	247
query59	3493	3064	3295	3064
query60	305	279	291	279
query61	115	111	109	109
query62	620	458	446	446
query63	316	288	298	288
query64	8625	2219	1740	1740
query65	3165	3126	3090	3090
query66	743	321	329	321
query67	15657	14882	15149	14882
query68	4702	533	530	530
query69	616	391	356	356
query70	1114	1108	1147	1108
query71	384	259	274	259
query72	8205	5620	2794	2794
query73	729	330	325	325
query74	5931	5517	5503	5503
query75	3491	2630	2687	2630
query76	2611	888	949	888
query77	666	294	294	294
query78	10327	9744	9710	9710
query79	2412	516	510	510
query80	1318	456	458	456
query81	566	221	222	221
query82	909	102	99	99
query83	361	157	163	157
query84	275	89	83	83
query85	1913	280	322	280
query86	468	320	325	320
query87	3284	3134	3097	3097
query88	4140	2337	2327	2327
query89	467	375	395	375
query90	1811	194	183	183
query91	126	96	97	96
query92	63	48	49	48
query93	2483	496	488	488
query94	1196	184	183	183
query95	391	299	306	299
query96	603	263	263	263
query97	3220	3008	3016	3008
query98	217	196	188	188
query99	1160	839	850	839
Total cold run time: 270444 ms
Total hot run time: 170570 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.35 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 28dc01ad16f3198a79e9b6d5faed78d8aca47465, data reload: false

query1	0.04	0.04	0.04
query2	0.08	0.04	0.04
query3	0.24	0.05	0.05
query4	1.66	0.08	0.08
query5	0.50	0.48	0.51
query6	1.14	0.72	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.55	0.49	0.49
query10	0.53	0.54	0.55
query11	0.15	0.11	0.11
query12	0.15	0.12	0.12
query13	0.59	0.60	0.61
query14	0.75	0.79	0.79
query15	0.83	0.81	0.81
query16	0.37	0.36	0.36
query17	1.04	1.03	0.99
query18	0.22	0.22	0.25
query19	1.88	1.72	1.83
query20	0.02	0.01	0.01
query21	15.41	0.65	0.65
query22	4.00	7.01	2.60
query23	18.67	1.42	1.38
query24	2.13	0.21	0.20
query25	0.16	0.09	0.08
query26	0.27	0.17	0.17
query27	0.09	0.09	0.08
query28	13.40	1.03	1.00
query29	12.66	3.34	3.27
query30	0.26	0.06	0.06
query31	2.86	0.41	0.39
query32	3.23	0.48	0.48
query33	2.88	2.90	2.97
query34	17.08	4.46	4.37
query35	4.50	4.47	4.47
query36	0.66	0.47	0.46
query37	0.19	0.15	0.14
query38	0.16	0.15	0.15
query39	0.05	0.03	0.03
query40	0.18	0.13	0.14
query41	0.10	0.05	0.04
query42	0.05	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.84 s
Total hot run time: 31.35 s

@zzzxl1993 zzzxl1993 force-pushed the need_read_data_opt_fix branch from 28dc01a to 9c0450b Compare June 14, 2024 11:53
@zzzxl1993
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TPC-H: Total hot run time: 40832 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 9c0450bc26f1784e0e4614b732414169883a4956, data reload: false

------ Round 1 ----------------------------------
q1	18166	4993	4360	4360
q2	2978	199	202	199
q3	11741	1199	1143	1143
q4	10952	873	783	783
q5	7637	2712	2706	2706
q6	225	142	140	140
q7	962	623	605	605
q8	9226	2052	2063	2052
q9	8828	6491	6490	6490
q10	8909	3708	3732	3708
q11	455	245	251	245
q12	429	235	227	227
q13	17770	2990	2988	2988
q14	273	219	219	219
q15	516	479	481	479
q16	556	405	385	385
q17	951	700	700	700
q18	8116	7469	7420	7420
q19	6008	1430	1399	1399
q20	640	329	332	329
q21	4977	3928	3959	3928
q22	410	327	336	327
Total cold run time: 120725 ms
Total hot run time: 40832 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4396	4208	4207	4207
q2	360	267	277	267
q3	2991	2754	2732	2732
q4	1874	1625	1653	1625
q5	5258	5248	5293	5248
q6	220	130	133	130
q7	2135	1713	1701	1701
q8	3188	3337	3299	3299
q9	8299	8298	8362	8298
q10	3862	3702	3643	3643
q11	589	484	485	484
q12	770	628	587	587
q13	17468	2994	3012	2994
q14	277	279	275	275
q15	524	463	471	463
q16	472	427	434	427
q17	1759	1501	1476	1476
q18	7815	7588	7355	7355
q19	1898	1679	1551	1551
q20	1966	1776	1758	1758
q21	4978	4845	4738	4738
q22	632	566	568	566
Total cold run time: 71731 ms
Total hot run time: 53824 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8989/24664)
Line Coverage: 28.02% (73696/263041)
Region Coverage: 27.49% (38278/139255)
Branch Coverage: 24.19% (19515/80690)
Coverage Report: http://coverage.selectdb-in.cc/coverage/9c0450bc26f1784e0e4614b732414169883a4956_9c0450bc26f1784e0e4614b732414169883a4956/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 172024 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 9c0450bc26f1784e0e4614b732414169883a4956, data reload: false

query1	936	373	378	373
query2	6464	2504	2432	2432
query3	6648	214	222	214
query4	19080	17395	17197	17197
query5	4176	497	466	466
query6	250	157	178	157
query7	4590	302	290	290
query8	326	288	288	288
query9	8651	2433	2404	2404
query10	609	315	284	284
query11	10523	9911	10146	9911
query12	145	83	81	81
query13	1634	371	361	361
query14	8898	6931	7908	6931
query15	231	188	188	188
query16	7935	268	258	258
query17	1908	530	539	530
query18	1962	266	269	266
query19	196	180	156	156
query20	97	83	81	81
query21	214	132	125	125
query22	4200	4076	3939	3939
query23	33720	32991	33197	32991
query24	11949	2781	2812	2781
query25	666	355	358	355
query26	1783	152	155	152
query27	2897	321	315	315
query28	7462	2074	2059	2059
query29	1071	631	623	623
query30	274	150	154	150
query31	929	744	756	744
query32	96	54	57	54
query33	765	285	277	277
query34	957	467	470	467
query35	737	615	614	614
query36	1078	913	944	913
query37	179	69	70	69
query38	2849	2757	2700	2700
query39	836	785	793	785
query40	289	131	123	123
query41	55	52	53	52
query42	121	102	102	102
query43	570	572	548	548
query44	1247	733	741	733
query45	207	163	168	163
query46	1112	732	725	725
query47	1858	1769	1756	1756
query48	384	304	301	301
query49	1195	413	398	398
query50	759	392	384	384
query51	6761	6741	6643	6643
query52	103	93	99	93
query53	373	295	295	295
query54	950	440	449	440
query55	76	72	75	72
query56	281	253	263	253
query57	1124	1039	1066	1039
query58	252	251	290	251
query59	3321	3091	3144	3091
query60	301	267	274	267
query61	94	92	129	92
query62	668	467	452	452
query63	319	291	288	288
query64	9818	2241	1733	1733
query65	3154	3084	3143	3084
query66	1376	319	347	319
query67	15436	15005	15071	15005
query68	4534	534	536	534
query69	456	312	322	312
query70	1193	1120	1151	1120
query71	387	283	277	277
query72	7129	5600	5028	5028
query73	741	327	321	321
query74	5958	5545	5433	5433
query75	3349	2641	2666	2641
query76	2613	874	889	874
query77	436	309	294	294
query78	10439	9880	9841	9841
query79	2386	528	513	513
query80	994	472	454	454
query81	602	223	228	223
query82	762	103	100	100
query83	236	173	171	171
query84	247	86	84	84
query85	2014	283	276	276
query86	493	331	286	286
query87	3270	3156	3114	3114
query88	4135	2351	2361	2351
query89	479	392	374	374
query90	1822	200	203	200
query91	130	100	100	100
query92	66	52	52	52
query93	2207	516	509	509
query94	1218	195	188	188
query95	408	366	322	322
query96	600	272	267	267
query97	3198	3068	3038	3038
query98	214	198	201	198
query99	1103	850	846	846
Total cold run time: 273944 ms
Total hot run time: 172024 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.43 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 9c0450bc26f1784e0e4614b732414169883a4956, data reload: false

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.23	0.04	0.05
query4	1.69	0.08	0.09
query5	0.49	0.49	0.49
query6	1.12	0.72	0.72
query7	0.02	0.01	0.01
query8	0.05	0.05	0.05
query9	0.56	0.50	0.50
query10	0.55	0.55	0.55
query11	0.15	0.12	0.12
query12	0.14	0.12	0.12
query13	0.59	0.59	0.60
query14	0.78	0.77	0.78
query15	0.85	0.81	0.81
query16	0.37	0.36	0.38
query17	1.04	1.01	1.04
query18	0.21	0.24	0.28
query19	1.88	1.79	1.83
query20	0.01	0.02	0.01
query21	15.42	0.66	0.66
query22	3.93	7.69	1.60
query23	18.30	1.30	1.28
query24	2.20	0.23	0.21
query25	0.16	0.08	0.09
query26	0.27	0.17	0.18
query27	0.08	0.08	0.09
query28	13.24	1.00	0.98
query29	12.65	3.31	3.27
query30	0.26	0.06	0.05
query31	2.86	0.38	0.39
query32	3.28	0.47	0.48
query33	2.88	2.90	2.85
query34	17.11	4.47	4.52
query35	4.54	4.54	4.49
query36	0.66	0.48	0.47
query37	0.18	0.15	0.15
query38	0.15	0.15	0.15
query39	0.04	0.04	0.04
query40	0.18	0.15	0.15
query41	0.09	0.06	0.04
query42	0.06	0.05	0.04
query43	0.04	0.04	0.03
Total cold run time: 109.43 s
Total hot run time: 30.43 s

@zzzxl1993 zzzxl1993 force-pushed the need_read_data_opt_fix branch from 9c0450b to a94a7f6 Compare June 14, 2024 15:33
@zzzxl1993
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8989/24659)
Line Coverage: 28.01% (73693/263054)
Region Coverage: 27.48% (38268/139274)
Branch Coverage: 24.18% (19513/80708)
Coverage Report: http://coverage.selectdb-in.cc/coverage/a94a7f66bf967d12e1836f7c4e129a8f90580b8a_a94a7f66bf967d12e1836f7c4e129a8f90580b8a/report/index.html

@doris-robot
Copy link

TPC-H: Total hot run time: 39923 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit a94a7f66bf967d12e1836f7c4e129a8f90580b8a, data reload: false

------ Round 1 ----------------------------------
q1	17605	4386	4288	4288
q2	2020	187	190	187
q3	10471	1183	1160	1160
q4	10185	901	799	799
q5	7565	2724	2611	2611
q6	214	133	133	133
q7	984	593	587	587
q8	9227	2101	2076	2076
q9	9104	6552	6521	6521
q10	8964	3711	3759	3711
q11	443	243	231	231
q12	447	238	225	225
q13	17770	2994	2966	2966
q14	267	208	229	208
q15	510	489	471	471
q16	502	388	373	373
q17	968	660	681	660
q18	8035	7478	7398	7398
q19	5072	1457	1452	1452
q20	671	326	334	326
q21	4938	3203	3921	3203
q22	397	337	343	337
Total cold run time: 116359 ms
Total hot run time: 39923 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4399	4294	4226	4226
q2	367	268	273	268
q3	2982	2983	2908	2908
q4	1994	1691	1706	1691
q5	5526	5577	5476	5476
q6	223	138	136	136
q7	2251	1856	1839	1839
q8	3302	3431	3437	3431
q9	8653	8748	8772	8748
q10	4075	3868	3777	3777
q11	571	493	496	493
q12	811	634	642	634
q13	17076	3117	3213	3117
q14	308	274	283	274
q15	523	503	492	492
q16	486	453	432	432
q17	1820	1498	1455	1455
q18	8128	8099	7797	7797
q19	3625	1673	1586	1586
q20	3094	1864	1811	1811
q21	5204	4723	4978	4723
q22	625	562	581	562
Total cold run time: 76043 ms
Total hot run time: 55876 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 170624 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit a94a7f66bf967d12e1836f7c4e129a8f90580b8a, data reload: false

query1	921	382	378	378
query2	6421	2385	2482	2385
query3	6625	202	203	202
query4	19091	17441	17114	17114
query5	3533	472	457	457
query6	234	152	160	152
query7	4585	296	287	287
query8	316	293	277	277
query9	8574	2372	2360	2360
query10	555	300	288	288
query11	10565	10093	10159	10093
query12	116	90	88	88
query13	1635	365	369	365
query14	10102	7412	7002	7002
query15	224	193	192	192
query16	7763	269	267	267
query17	1896	545	510	510
query18	1942	280	279	279
query19	195	149	150	149
query20	86	85	80	80
query21	207	126	122	122
query22	4380	4144	4015	4015
query23	33907	33496	33608	33496
query24	10721	2882	2963	2882
query25	600	367	361	361
query26	704	159	156	156
query27	2404	331	320	320
query28	6272	2136	2103	2103
query29	879	620	602	602
query30	253	163	152	152
query31	933	755	745	745
query32	98	51	54	51
query33	656	296	314	296
query34	897	484	501	484
query35	746	653	635	635
query36	1116	970	964	964
query37	141	87	80	80
query38	2924	2827	2782	2782
query39	878	787	835	787
query40	217	137	121	121
query41	54	53	55	53
query42	124	96	94	94
query43	581	546	544	544
query44	1061	744	718	718
query45	192	164	166	164
query46	1065	728	717	717
query47	1848	1772	1810	1772
query48	369	295	296	295
query49	836	404	401	401
query50	759	379	379	379
query51	6799	6710	6609	6609
query52	103	86	87	86
query53	348	285	283	283
query54	897	432	431	431
query55	71	71	73	71
query56	273	254	247	247
query57	1120	1061	1052	1052
query58	247	230	231	230
query59	3296	3086	3275	3086
query60	288	276	264	264
query61	119	85	91	85
query62	572	444	426	426
query63	311	292	288	288
query64	8493	2262	1697	1697
query65	3181	3106	3076	3076
query66	722	321	323	321
query67	15378	15069	15089	15069
query68	5275	535	539	535
query69	640	449	447	447
query70	1144	1099	1116	1099
query71	442	277	273	273
query72	7364	5472	2757	2757
query73	771	319	322	319
query74	5786	5564	5525	5525
query75	3574	2669	2665	2665
query76	3082	932	965	932
query77	618	292	286	286
query78	10483	9705	9731	9705
query79	2945	509	509	509
query80	2087	460	450	450
query81	585	217	223	217
query82	1453	104	98	98
query83	338	165	168	165
query84	277	93	83	83
query85	1329	273	263	263
query86	460	313	310	310
query87	3275	3099	3092	3092
query88	4001	2332	2311	2311
query89	458	383	382	382
query90	1668	182	181	181
query91	130	101	100	100
query92	53	50	49	49
query93	2643	515	498	498
query94	1029	179	190	179
query95	405	316	311	311
query96	588	258	260	258
query97	3185	3062	3094	3062
query98	209	203	200	200
query99	1125	834	826	826
Total cold run time: 270841 ms
Total hot run time: 170624 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.03 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit a94a7f66bf967d12e1836f7c4e129a8f90580b8a, data reload: false

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.24	0.05	0.04
query4	1.68	0.07	0.08
query5	0.49	0.47	0.49
query6	1.12	0.73	0.73
query7	0.02	0.01	0.01
query8	0.06	0.04	0.05
query9	0.54	0.48	0.49
query10	0.54	0.56	0.53
query11	0.15	0.12	0.12
query12	0.16	0.12	0.12
query13	0.61	0.59	0.61
query14	0.78	0.78	0.79
query15	0.83	0.81	0.81
query16	0.36	0.38	0.37
query17	1.02	0.99	1.01
query18	0.20	0.25	0.26
query19	1.79	1.67	1.78
query20	0.01	0.02	0.01
query21	15.42	0.66	0.65
query22	4.18	6.62	2.39
query23	18.29	1.34	1.28
query24	2.09	0.25	0.22
query25	0.15	0.08	0.09
query26	0.26	0.18	0.18
query27	0.07	0.08	0.09
query28	13.16	1.02	0.98
query29	12.62	3.31	3.29
query30	0.26	0.06	0.06
query31	2.85	0.38	0.38
query32	3.29	0.47	0.46
query33	2.87	2.90	2.93
query34	17.10	4.39	4.41
query35	4.52	4.47	4.47
query36	0.65	0.48	0.49
query37	0.18	0.15	0.15
query38	0.16	0.14	0.14
query39	0.04	0.04	0.03
query40	0.16	0.14	0.14
query41	0.10	0.05	0.05
query42	0.05	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.23 s
Total hot run time: 31.03 s

@doris-robot
Copy link

TPC-H: Total hot run time: 40618 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 85a992a2a694e7a79c4e5a206695c97c2fafdef2, data reload: false

------ Round 1 ----------------------------------
q1	17793	4364	4280	4280
q2	2036	185	188	185
q3	10577	1188	1287	1188
q4	10200	841	840	840
q5	7527	2697	2660	2660
q6	220	136	136	136
q7	959	621	592	592
q8	9426	2095	2089	2089
q9	8848	6574	6548	6548
q10	9024	3751	3760	3751
q11	457	234	242	234
q12	448	236	226	226
q13	17879	3129	3211	3129
q14	279	236	231	231
q15	515	482	477	477
q16	508	399	397	397
q17	967	714	710	710
q18	8821	8082	7649	7649
q19	8207	1546	1431	1431
q20	728	336	339	336
q21	5090	3198	3267	3198
q22	385	331	333	331
Total cold run time: 120894 ms
Total hot run time: 40618 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4584	4258	4317	4258
q2	398	292	268	268
q3	3150	2909	2963	2909
q4	2003	1700	1698	1698
q5	5522	5447	5598	5447
q6	226	131	140	131
q7	2194	1793	1866	1793
q8	3305	3395	3397	3395
q9	8641	8798	8703	8703
q10	4081	3786	3815	3786
q11	594	515	488	488
q12	810	657	640	640
q13	17219	3142	3182	3142
q14	301	268	270	268
q15	507	474	486	474
q16	486	428	425	425
q17	1812	1501	1520	1501
q18	8141	7801	7874	7801
q19	1822	1668	1744	1668
q20	3098	1864	1869	1864
q21	8197	4883	4902	4883
q22	605	555	539	539
Total cold run time: 77696 ms
Total hot run time: 56081 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 174468 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 85a992a2a694e7a79c4e5a206695c97c2fafdef2, data reload: false

query1	924	385	383	383
query2	6374	2536	2221	2221
query3	6629	206	206	206
query4	19749	17265	17269	17265
query5	3715	486	436	436
query6	244	161	177	161
query7	4585	293	298	293
query8	289	273	264	264
query9	8600	2386	2387	2386
query10	577	287	271	271
query11	10633	10163	10072	10072
query12	118	92	93	92
query13	1650	363	361	361
query14	9908	7658	7555	7555
query15	229	189	182	182
query16	7772	268	266	266
query17	1905	528	511	511
query18	1893	274	266	266
query19	203	163	152	152
query20	93	84	82	82
query21	221	133	129	129
query22	4372	4196	4144	4144
query23	33853	33511	33759	33511
query24	8250	2901	2933	2901
query25	597	373	362	362
query26	724	152	157	152
query27	2282	326	315	315
query28	5804	2116	2100	2100
query29	890	649	629	629
query30	290	151	155	151
query31	975	786	764	764
query32	91	56	61	56
query33	649	310	287	287
query34	891	495	476	476
query35	751	619	620	619
query36	1114	983	1000	983
query37	151	76	72	72
query38	2939	2808	2861	2808
query39	880	831	840	831
query40	208	130	136	130
query41	58	54	55	54
query42	117	105	103	103
query43	605	564	533	533
query44	1076	726	731	726
query45	191	165	164	164
query46	1077	707	741	707
query47	1891	1791	1808	1791
query48	363	292	289	289
query49	905	410	422	410
query50	767	402	401	401
query51	6832	6587	6682	6587
query52	101	93	93	93
query53	366	287	287	287
query54	870	456	458	456
query55	75	76	72	72
query56	297	284	272	272
query57	1116	1053	1074	1053
query58	259	264	262	262
query59	3526	3235	3407	3235
query60	297	286	296	286
query61	117	112	108	108
query62	588	452	528	452
query63	315	286	288	286
query64	8557	2219	1749	1749
query65	3195	3109	3089	3089
query66	745	316	332	316
query67	15550	15016	15117	15016
query68	4759	542	543	542
query69	684	445	393	393
query70	1178	1155	1142	1142
query71	404	267	272	267
query72	9269	5195	5281	5195
query73	770	320	319	319
query74	5963	5569	5546	5546
query75	4290	2657	2691	2657
query76	3005	958	958	958
query77	754	300	348	300
query78	10666	9974	9921	9921
query79	2656	509	509	509
query80	1213	454	447	447
query81	540	224	220	220
query82	770	102	96	96
query83	417	168	168	168
query84	273	81	91	81
query85	1600	286	271	271
query86	464	328	321	321
query87	3345	3108	3101	3101
query88	4303	2339	2332	2332
query89	478	376	383	376
query90	1887	187	185	185
query91	128	95	148	95
query92	62	49	47	47
query93	3781	506	507	506
query94	1304	187	184	184
query95	413	321	307	307
query96	600	261	261	261
query97	3260	3068	3047	3047
query98	219	198	194	194
query99	1177	838	839	838
Total cold run time: 272510 ms
Total hot run time: 174468 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.9 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 85a992a2a694e7a79c4e5a206695c97c2fafdef2, data reload: false

query1	0.04	0.03	0.03
query2	0.07	0.04	0.04
query3	0.23	0.04	0.05
query4	1.68	0.07	0.07
query5	0.49	0.50	0.48
query6	1.13	0.72	0.72
query7	0.02	0.02	0.02
query8	0.05	0.04	0.04
query9	0.54	0.48	0.49
query10	0.54	0.56	0.54
query11	0.15	0.10	0.11
query12	0.15	0.12	0.12
query13	0.59	0.59	0.60
query14	0.79	0.76	0.80
query15	0.84	0.81	0.81
query16	0.37	0.36	0.36
query17	1.02	0.97	0.98
query18	0.20	0.27	0.22
query19	1.86	1.76	1.82
query20	0.02	0.01	0.01
query21	15.41	0.65	0.66
query22	4.22	6.79	2.18
query23	18.31	1.26	1.31
query24	2.11	0.22	0.24
query25	0.15	0.10	0.08
query26	0.28	0.17	0.17
query27	0.08	0.08	0.07
query28	13.17	1.01	0.99
query29	12.60	3.39	3.40
query30	0.25	0.06	0.06
query31	2.85	0.38	0.39
query32	3.29	0.47	0.46
query33	2.89	2.91	2.89
query34	17.09	4.43	4.40
query35	4.45	4.49	4.51
query36	0.65	0.45	0.46
query37	0.18	0.16	0.16
query38	0.15	0.15	0.14
query39	0.04	0.04	0.03
query40	0.18	0.14	0.15
query41	0.09	0.05	0.05
query42	0.06	0.04	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.33 s
Total hot run time: 30.9 s

@xiaokang xiaokang changed the title [fix](inverted index) fix the issue where need_read_data does not han… [fix](inverted index) fix the issue where need_read_data does not handle non-pushdown conditions Jun 16, 2024
if (!_check_apply_by_inverted_index(pred)) {
continue;
}
push_down_preds.insert(_gen_predicate_result_sign(pred));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pred may not be evaluated by index even if _check_apply_by_inverted_index(pred) return true due to skip index based on hit ratio. So push_down_preds.contains(column_sign) can not guarantee that the pred for column_sing can be skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section only calculates which conditions definitely require data reading, the conditions that do not require data reading are computed in other logical calculations.

@@ -984,7 +1012,7 @@ std::string SegmentIterator::_gen_predicate_result_sign(ColumnPredicate* predica

std::string col_name = column_desc->name();

if (column_desc->path() != nullptr) {
if (column_desc->path() != nullptr && !_storage_name_and_type.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this another problem?

Copy link
Member

@airborne12 airborne12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 17, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@qidaye qidaye merged commit 3e6a884 into apache:master Jun 17, 2024
31 of 35 checks passed
xiaokang pushed a commit that referenced this pull request Jun 19, 2024
xiaokang pushed a commit that referenced this pull request Jun 20, 2024
dataroaring pushed a commit that referenced this pull request Jun 21, 2024
…dle non-pushdown conditions (#36292)

…dle non-pushdown conditions

1. Fixed the previous optimization of
#35346 not handling non-pushdown
conditions.
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants