Skip to content

Conversation

@924060929
Copy link
Contributor

@924060929 924060929 commented Aug 6, 2024

Proposed changes

The Expression.hashCode default is getClass().hashCode(), just contains one level information, so the lots of expressions which is same type will return the same hash code and conflict, then compare deeply in the HashMap cause inefficient and hold table lock for long time.

This pr support fast compute hash code by the bottom literal and slot, reduce the compare expression time because of the conflict of hash code

In my test case, the sql planner time can reduce from 20 minutes(not finished) to 35 seconds

@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.

@github-actions github-actions bot added the doing label Aug 6, 2024
@924060929
Copy link
Contributor Author

run buildall

1 similar comment
@924060929
Copy link
Contributor Author

run buildall

@924060929 924060929 changed the title [enhancement](Nereids) fast compute hash code of deep expression tree without conflict [enhancement](Nereids) fast compute hash code of deep expression tree to reduce conflict Aug 6, 2024
@924060929
Copy link
Contributor Author

run buildall

1 similar comment
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18314	4164	4114	4114
q2	2437	212	202	202
q3	13467	1303	1351	1303
q4	10541	877	935	877
q5	7687	3028	2953	2953
q6	216	135	138	135
q7	1049	623	625	623
q8	9431	1911	1946	1911
q9	8402	6555	6585	6555
q10	8649	3803	3796	3796
q11	421	258	260	258
q12	414	238	233	233
q13	17757	2956	2895	2895
q14	267	242	244	242
q15	524	480	502	480
q16	485	400	388	388
q17	955	925	923	923
q18	8147	7299	7319	7299
q19	1381	1216	1197	1197
q20	561	335	332	332
q21	5338	4717	4689	4689
q22	359	283	285	283
Total cold run time: 116802 ms
Total hot run time: 41688 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4032	3972	3972	3972
q2	328	226	217	217
q3	3026	2983	2982	2982
q4	1853	1835	1864	1835
q5	5224	5210	5229	5210
q6	215	128	131	128
q7	2070	1701	1635	1635
q8	3171	3246	3235	3235
q9	8253	8264	8271	8264
q10	3754	3823	3828	3823
q11	540	451	452	451
q12	716	581	574	574
q13	14178	2947	2945	2945
q14	289	257	260	257
q15	512	473	482	473
q16	439	392	403	392
q17	1743	1709	1687	1687
q18	7788	7283	7146	7146
q19	1669	1687	1710	1687
q20	2010	1794	1754	1754
q21	5412	5201	5268	5201
q22	524	439	458	439
Total cold run time: 67746 ms
Total hot run time: 54307 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168931 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 1ae819650e5196c18db145933c128f997c0d4869, data reload: false

query1	901	369	388	369
query2	6475	1700	1692	1692
query3	6679	210	215	210
query4	19993	17482	17163	17163
query5	4262	536	537	536
query6	299	190	187	187
query7	4596	303	296	296
query8	250	205	197	197
query9	8517	2379	2371	2371
query10	427	283	269	269
query11	10598	10065	10169	10065
query12	133	88	86	86
query13	1643	370	371	370
query14	10080	7001	6948	6948
query15	209	166	172	166
query16	7079	490	457	457
query17	968	577	568	568
query18	1922	292	287	287
query19	201	152	154	152
query20	98	89	90	89
query21	206	106	98	98
query22	4195	4068	4038	4038
query23	33489	32705	33011	32705
query24	10280	3063	3074	3063
query25	698	406	419	406
query26	1772	152	159	152
query27	2928	281	280	280
query28	6949	1983	1969	1969
query29	1318	445	436	436
query30	293	154	151	151
query31	936	763	743	743
query32	99	59	58	58
query33	689	330	342	330
query34	910	494	492	492
query35	848	757	748	748
query36	1012	852	875	852
query37	292	81	80	80
query38	2886	2743	2860	2743
query39	880	823	820	820
query40	292	124	119	119
query41	51	47	46	46
query42	124	103	102	102
query43	483	427	418	418
query44	1222	741	727	727
query45	208	178	175	175
query46	1090	834	818	818
query47	1802	1718	1714	1714
query48	375	295	303	295
query49	1209	449	452	449
query50	932	449	450	449
query51	6754	6645	6730	6645
query52	103	91	100	91
query53	257	190	184	184
query54	650	461	468	461
query55	78	77	80	77
query56	304	272	268	268
query57	1194	1044	1059	1044
query58	319	273	289	273
query59	2626	2402	2321	2321
query60	316	284	301	284
query61	117	116	119	116
query62	931	663	665	663
query63	216	192	186	186
query64	6028	1951	1886	1886
query65	3129	3101	3093	3093
query66	1431	335	326	326
query67	15579	14706	14709	14706
query68	8815	599	598	598
query69	723	412	328	328
query70	1208	1062	1118	1062
query71	539	288	286	286
query72	8106	2664	2459	2459
query73	1552	340	330	330
query74	6054	5690	5704	5690
query75	4873	2742	2742	2742
query76	5953	1308	1297	1297
query77	882	328	329	328
query78	9699	8915	8873	8873
query79	7332	542	553	542
query80	831	530	532	530
query81	553	234	234	234
query82	281	136	139	136
query83	316	175	183	175
query84	261	76	79	76
query85	1022	371	309	309
query86	377	304	301	301
query87	3268	3098	3059	3059
query88	4092	2450	2404	2404
query89	524	285	297	285
query90	2094	197	197	197
query91	133	101	102	101
query92	63	50	53	50
query93	5709	617	620	617
query94	1047	295	297	295
query95	388	268	267	267
query96	644	280	280	280
query97	3242	3070	3034	3034
query98	220	201	193	193
query99	1613	1275	1288	1275
Total cold run time: 286244 ms
Total hot run time: 168931 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.07	0.03	0.04
query3	0.22	0.04	0.04
query4	1.69	0.06	0.06
query5	0.48	0.49	0.48
query6	1.12	0.72	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.58	0.52	0.50
query10	0.56	0.56	0.57
query11	0.16	0.12	0.12
query12	0.15	0.13	0.12
query13	0.61	0.62	0.60
query14	0.77	0.79	0.80
query15	0.90	0.88	0.86
query16	0.36	0.35	0.36
query17	0.99	0.99	1.00
query18	0.22	0.21	0.21
query19	1.86	1.77	1.66
query20	0.01	0.01	0.01
query21	15.40	0.73	0.66
query22	3.93	7.44	1.79
query23	17.92	1.43	1.32
query24	2.26	0.23	0.22
query25	0.18	0.08	0.09
query26	0.31	0.21	0.22
query27	0.46	0.23	0.23
query28	13.15	1.02	0.97
query29	12.53	3.34	3.33
query30	0.24	0.05	0.05
query31	2.89	0.41	0.40
query32	3.24	0.49	0.50
query33	2.88	2.99	2.95
query34	15.42	4.26	4.24
query35	4.30	4.29	4.30
query36	0.68	0.48	0.48
query37	0.19	0.17	0.17
query38	0.16	0.16	0.16
query39	0.04	0.03	0.03
query40	0.17	0.13	0.15
query41	0.10	0.05	0.04
query42	0.05	0.05	0.05
query43	0.06	0.04	0.04
Total cold run time: 107.42 s
Total hot run time: 30.52 s

@924060929
Copy link
Contributor Author

run buildall

@924060929 924060929 force-pushed the fast_compute_hash_code branch from 896ebc7 to b82026f Compare August 7, 2024 06:13
@924060929
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the doing label Aug 7, 2024
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18123	4212	4144	4144
q2	2247	185	170	170
q3	10734	1265	1322	1265
q4	10372	824	949	824
q5	7534	2819	2807	2807
q6	219	137	135	135
q7	1043	603	595	595
q8	9437	1803	1923	1803
q9	8437	6606	6604	6604
q10	6988	2494	2511	2494
q11	429	243	245	243
q12	398	224	225	224
q13	17770	2974	2946	2946
q14	276	243	240	240
q15	545	486	495	486
q16	495	404	398	398
q17	969	912	895	895
q18	8029	7339	7240	7240
q19	1728	1200	1220	1200
q20	576	333	315	315
q21	5218	4744	4718	4718
q22	1038	970	966	966
Total cold run time: 112605 ms
Total hot run time: 40712 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4066	4067	4085	4067
q2	329	227	223	223
q3	2800	2782	2776	2776
q4	1866	1854	1844	1844
q5	5161	5198	5156	5156
q6	213	132	129	129
q7	1989	1595	1603	1595
q8	3171	3257	3256	3256
q9	8354	8265	8295	8265
q10	3246	3337	3318	3318
q11	556	442	453	442
q12	758	569	547	547
q13	16717	2977	2956	2956
q14	285	258	254	254
q15	522	486	483	483
q16	450	404	407	404
q17	1717	1716	1680	1680
q18	7729	7383	7151	7151
q19	1662	1651	1670	1651
q20	1977	1756	1766	1756
q21	5449	5148	5237	5148
q22	1058	965	986	965
Total cold run time: 70075 ms
Total hot run time: 54066 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17599	4197	4068	4068
q2	2030	181	179	179
q3	10514	1265	1382	1265
q4	10162	831	938	831
q5	7556	2843	2857	2843
q6	223	143	140	140
q7	1056	644	607	607
q8	9445	1824	1972	1824
q9	8530	6643	6665	6643
q10	7113	2507	2490	2490
q11	430	252	254	252
q12	401	226	227	226
q13	17766	2986	2948	2948
q14	275	246	248	246
q15	524	493	490	490
q16	483	413	396	396
q17	976	940	932	932
q18	8303	7311	7193	7193
q19	1383	1231	1229	1229
q20	574	325	323	323
q21	5307	4814	4814	4814
q22	1046	957	973	957
Total cold run time: 111696 ms
Total hot run time: 40896 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4041	4044	4014	4014
q2	330	219	219	219
q3	2810	2838	2830	2830
q4	1881	1919	1856	1856
q5	5183	5231	5194	5194
q6	221	131	130	130
q7	2013	1603	1594	1594
q8	3190	3317	3261	3261
q9	8337	8344	8313	8313
q10	3238	3312	3302	3302
q11	553	456	445	445
q12	774	535	547	535
q13	14226	2940	2933	2933
q14	286	253	263	253
q15	530	476	479	476
q16	443	400	383	383
q17	1747	1726	1714	1714
q18	7877	7290	7196	7196
q19	1663	1696	1681	1681
q20	1987	1771	1753	1753
q21	5456	5211	5218	5211
q22	1057	972	927	927
Total cold run time: 67843 ms
Total hot run time: 54220 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17738	4459	4358	4358
q2	2030	178	174	174
q3	10527	1114	1071	1071
q4	10147	709	684	684
q5	7507	2571	2556	2556
q6	224	139	138	138
q7	972	604	599	599
q8	9205	1942	1912	1912
q9	8900	6609	6598	6598
q10	7072	2218	2207	2207
q11	449	243	243	243
q12	454	220	217	217
q13	18645	2970	3016	2970
q14	280	240	241	240
q15	533	479	490	479
q16	521	397	388	388
q17	966	664	742	664
q18	8196	7455	7391	7391
q19	6271	1061	1078	1061
q20	675	347	328	328
q21	6127	4598	4600	4598
q22	1115	1022	1008	1008
Total cold run time: 118554 ms
Total hot run time: 39884 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4527	4287	4258	4258
q2	368	271	265	265
q3	2909	2818	2795	2795
q4	2001	1696	1810	1696
q5	5551	5580	5459	5459
q6	223	130	128	128
q7	2213	1786	1778	1778
q8	3263	3453	3426	3426
q9	8882	8858	8769	8769
q10	3602	3200	3220	3200
q11	599	492	505	492
q12	806	622	630	622
q13	16035	3182	3129	3129
q14	313	280	286	280
q15	522	475	498	475
q16	501	447	431	431
q17	1810	1541	1540	1540
q18	8073	7957	7762	7762
q19	1769	1557	1594	1557
q20	2085	1945	1862	1862
q21	5431	5335	5153	5153
q22	1126	1074	1066	1066
Total cold run time: 72609 ms
Total hot run time: 56143 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17647	4393	4242	4242
q2	2011	176	179	176
q3	10483	1193	1025	1025
q4	10140	759	741	741
q5	7512	2509	2467	2467
q6	220	139	142	139
q7	951	581	592	581
q8	9216	1883	2032	1883
q9	8571	6530	6546	6530
q10	7084	2227	2161	2161
q11	444	238	240	238
q12	465	214	211	211
q13	17968	2971	2970	2970
q14	281	229	228	228
q15	524	486	475	475
q16	502	383	384	383
q17	971	631	734	631
q18	7901	7472	7363	7363
q19	4941	985	999	985
q20	635	325	336	325
q21	5274	4279	4271	4271
q22	1121	1005	990	990
Total cold run time: 114862 ms
Total hot run time: 39015 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4381	4229	4226	4226
q2	375	280	275	275
q3	2846	2621	2591	2591
q4	1935	1675	1664	1664
q5	5518	5565	5432	5432
q6	228	136	130	130
q7	2084	1733	1706	1706
q8	3297	3393	3415	3393
q9	8699	8657	8788	8657
q10	3571	3218	3272	3218
q11	596	504	502	502
q12	819	572	584	572
q13	16971	3176	3204	3176
q14	332	298	317	298
q15	523	481	495	481
q16	488	441	425	425
q17	1854	1556	1505	1505
q18	7962	7929	7803	7803
q19	1684	1665	1526	1526
q20	2073	1866	1889	1866
q21	9193	5222	5423	5222
q22	1100	1018	1007	1007
Total cold run time: 76529 ms
Total hot run time: 55675 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17616	4509	4275	4275
q2	2027	180	184	180
q3	10481	1178	1084	1084
q4	10133	686	754	686
q5	7532	2521	2593	2521
q6	235	142	146	142
q7	1000	627	597	597
q8	9412	1937	2043	1937
q9	10366	6605	6586	6586
q10	7073	2194	2180	2180
q11	436	250	249	249
q12	550	232	222	222
q13	17774	2964	2992	2964
q14	284	236	235	235
q15	519	478	487	478
q16	495	387	389	387
q17	969	655	689	655
q18	8102	7607	7483	7483
q19	1385	1040	1013	1013
q20	644	322	350	322
q21	5465	4516	4143	4143
q22	1116	1041	999	999
Total cold run time: 113614 ms
Total hot run time: 39338 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4297	4277	4226	4226
q2	386	274	271	271
q3	2885	2619	2595	2595
q4	1869	1630	1634	1630
q5	5307	5322	5295	5295
q6	223	135	133	133
q7	2023	1709	1689	1689
q8	3171	3301	3327	3301
q9	8504	8389	8372	8372
q10	3394	3147	3110	3110
q11	608	493	488	488
q12	775	619	583	583
q13	17336	2991	2994	2991
q14	307	274	266	266
q15	532	492	481	481
q16	492	420	423	420
q17	1787	1429	1463	1429
q18	7702	7448	7515	7448
q19	1630	1610	1459	1459
q20	1960	1803	1764	1764
q21	5448	5096	5094	5094
q22	1102	1033	1015	1015
Total cold run time: 71738 ms
Total hot run time: 54060 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17651	4312	4271	4271
q2	2021	176	181	176
q3	10495	1138	1046	1046
q4	10155	758	753	753
q5	7495	2522	2475	2475
q6	223	134	133	133
q7	973	611	582	582
q8	9210	1900	1883	1883
q9	8556	6561	6568	6561
q10	7049	2216	2170	2170
q11	436	244	237	237
q12	447	219	218	218
q13	18250	2976	2930	2930
q14	274	237	229	229
q15	523	487	498	487
q16	516	395	378	378
q17	977	662	634	634
q18	7978	7552	7303	7303
q19	3125	1055	1056	1055
q20	682	329	326	326
q21	5294	4388	4292	4292
q22	1100	1006	988	988
Total cold run time: 113430 ms
Total hot run time: 39127 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4395	4238	4289	4238
q2	389	279	267	267
q3	2832	2626	2637	2626
q4	1870	1682	1638	1638
q5	5493	5549	5522	5522
q6	221	132	135	132
q7	2105	1755	1731	1731
q8	3279	3417	3395	3395
q9	8774	8695	8701	8695
q10	3538	3240	3268	3240
q11	602	508	491	491
q12	847	671	571	571
q13	16486	3107	3158	3107
q14	310	286	296	286
q15	532	491	485	485
q16	503	447	415	415
q17	1809	1583	1498	1498
q18	8015	7792	7828	7792
q19	1717	1623	1468	1468
q20	2142	1899	1866	1866
q21	9724	5386	5490	5386
q22	1080	1012	1037	1012
Total cold run time: 76663 ms
Total hot run time: 55861 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 203301 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 a5dab1d033c8887bf891ef73b752910da63ac4f6, data reload: false

query1	952	396	388	388
query2	6438	2000	1917	1917
query3	6656	208	229	208
query4	34256	23288	22983	22983
query5	3647	479	496	479
query6	267	172	170	170
query7	4567	300	286	286
query8	242	206	201	201
query9	8711	2365	2349	2349
query10	903	896	895	895
query11	16410	15031	15051	15031
query12	140	100	98	98
query13	1648	386	372	372
query14	10258	8018	7986	7986
query15	386	322	288	288
query16	7693	484	491	484
query17	1723	615	556	556
query18	2066	378	424	378
query19	254	232	206	206
query20	113	114	117	114
query21	220	102	104	102
query22	4934	4528	4714	4528
query23	34511	33615	34031	33615
query24	9662	2911	2880	2880
query25	596	398	393	393
query26	699	155	154	154
query27	2124	284	280	280
query28	5782	2040	2024	2024
query29	801	420	421	420
query30	264	153	149	149
query31	1016	749	719	719
query32	94	51	56	51
query33	607	282	274	274
query34	856	465	470	465
query35	935	839	847	839
query36	1054	904	904	904
query37	133	77	81	77
query38	4216	4184	4074	4074
query39	1447	1359	1382	1359
query40	192	111	112	111
query41	45	47	44	44
query42	114	94	96	94
query43	534	477	479	477
query44	1085	731	732	731
query45	402	379	367	367
query46	1095	746	769	746
query47	1872	1787	1825	1787
query48	377	290	297	290
query49	841	419	412	412
query50	787	409	394	394
query51	6767	6743	6635	6635
query52	98	89	92	89
query53	253	179	175	175
query54	771	438	445	438
query55	75	71	72	71
query56	260	238	245	238
query57	1157	1079	1060	1060
query58	219	218	228	218
query59	3149	2853	2734	2734
query60	288	256	268	256
query61	96	92	95	92
query62	778	639	637	637
query63	208	182	180	180
query64	9255	2421	1915	1915
query65	3205	3110	3133	3110
query66	744	327	337	327
query67	15472	14717	14808	14717
query68	6188	547	552	547
query69	465	430	423	423
query70	1136	1107	1091	1091
query71	516	270	275	270
query72	19873	16329	16564	16329
query73	799	321	320	320
query74	9076	8667	8751	8667
query75	4443	2681	2671	2671
query76	3657	1017	1008	1008
query77	690	299	305	299
query78	10389	9067	9270	9067
query79	3864	524	510	510
query80	2327	521	495	495
query81	605	228	231	228
query82	858	148	133	133
query83	298	155	154	154
query84	271	81	81	81
query85	1386	299	304	299
query86	432	284	267	267
query87	4822	4406	4542	4406
query88	4435	2486	2491	2486
query89	429	285	285	285
query90	1999	193	197	193
query91	141	123	120	120
query92	62	49	46	46
query93	5415	535	533	533
query94	956	281	276	276
query95	353	257	260	257
query96	630	274	272	272
query97	3251	3080	3099	3080
query98	208	203	196	196
query99	1553	1252	1251	1251
Total cold run time: 318947 ms
Total hot run time: 203301 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.04	0.04
query3	0.22	0.05	0.05
query4	1.67	0.07	0.07
query5	0.50	0.50	0.49
query6	1.14	0.73	0.72
query7	0.02	0.02	0.01
query8	0.05	0.05	0.04
query9	0.54	0.48	0.50
query10	0.53	0.56	0.53
query11	0.15	0.11	0.11
query12	0.15	0.13	0.12
query13	0.60	0.60	0.59
query14	0.75	0.78	0.79
query15	0.86	0.83	0.80
query16	0.37	0.37	0.37
query17	0.97	1.05	1.01
query18	0.23	0.21	0.22
query19	1.74	1.66	1.70
query20	0.01	0.01	0.01
query21	15.38	0.74	0.65
query22	4.26	6.34	2.68
query23	18.36	1.36	1.26
query24	2.14	0.22	0.21
query25	0.15	0.08	0.07
query26	0.31	0.21	0.20
query27	0.46	0.22	0.21
query28	13.28	1.03	1.00
query29	12.60	3.29	3.28
query30	0.23	0.06	0.06
query31	2.89	0.38	0.39
query32	3.30	0.48	0.47
query33	2.87	2.90	2.82
query34	16.99	4.38	4.37
query35	4.47	4.38	4.43
query36	0.63	0.49	0.47
query37	0.19	0.16	0.16
query38	0.15	0.15	0.14
query39	0.05	0.04	0.04
query40	0.14	0.12	0.13
query41	0.10	0.04	0.04
query42	0.06	0.04	0.05
query43	0.05	0.04	0.05
Total cold run time: 109.67 s
Total hot run time: 31.21 s

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

github-actions bot commented Aug 8, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2024

PR approved by anyone and no changes requested.

@924060929 924060929 merged commit d5049ec into apache:master Aug 8, 2024
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Aug 9, 2024
… to reduce conflict (apache#38981)

The Expression.hashCode default is getClass().hashCode(), just contains
one level information, so the lots of expressions which is same type
will return the same hash code and conflict, then compare deeply in the
HashMap cause inefficient and hold table lock for long time.

This pr support fast compute hash code by the bottom literal and slot,
reduce the compare expression time because of the conflict of hash code

In my test case, the sql planner time can reduce from 20 minutes(not
finished) to 35 seconds

(cherry picked from commit d5049ec)
924060929 added a commit that referenced this pull request Aug 9, 2024
… to reduce conflict (#38981) (#39133)

The Expression.hashCode default is getClass().hashCode(), just contains one level information, so the lots of expressions which is same type will return the same hash code and conflict, then compare deeply in the HashMap cause inefficient and hold table lock for long time.

This pr support fast compute hash code by the bottom literal and slot, reduce the compare expression time because of the conflict of hash code

In my test case, the sql planner time can reduce from 20 minutes(not finished) to 35 seconds
dataroaring pushed a commit that referenced this pull request Aug 11, 2024
… to reduce conflict (#38981)

The Expression.hashCode default is getClass().hashCode(), just contains
one level information, so the lots of expressions which is same type
will return the same hash code and conflict, then compare deeply in the
HashMap cause inefficient and hold table lock for long time.

This pr support fast compute hash code by the bottom literal and slot,
reduce the compare expression time because of the conflict of hash code

In my test case, the sql planner time can reduce from 20 minutes(not
finished) to 35 seconds
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Aug 14, 2024
… to reduce conflict (apache#38981)

The Expression.hashCode default is getClass().hashCode(), just contains
one level information, so the lots of expressions which is same type
will return the same hash code and conflict, then compare deeply in the
HashMap cause inefficient and hold table lock for long time.

This pr support fast compute hash code by the bottom literal and slot,
reduce the compare expression time because of the conflict of hash code

In my test case, the sql planner time can reduce from 20 minutes(not
finished) to 35 seconds
dataroaring pushed a commit that referenced this pull request Aug 16, 2024
… to reduce conflict (#38981)

The Expression.hashCode default is getClass().hashCode(), just contains
one level information, so the lots of expressions which is same type
will return the same hash code and conflict, then compare deeply in the
HashMap cause inefficient and hold table lock for long time.

This pr support fast compute hash code by the bottom literal and slot,
reduce the compare expression time because of the conflict of hash code

In my test case, the sql planner time can reduce from 20 minutes(not
finished) to 35 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.1.6-merged dev/3.0.2-merged doing reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants