Skip to content

Conversation

@924060929
Copy link
Contributor

@924060929 924060929 commented Oct 30, 2024

Proposed changes

fix FoldConstantRuleOnFE too slow when CaseWhen clause nesting multiple layers.

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

@924060929
Copy link
Contributor Author

run buildall

@wm1581066 wm1581066 added dev/2.1.x usercase Important user case type label p0_c labels Oct 30, 2024
morrySnow
morrySnow previously approved these changes Oct 30, 2024
@github-actions
Copy link
Contributor

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

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

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17576	7392	7260	7260
q2	2033	162	156	156
q3	10638	1104	1157	1104
q4	10559	836	803	803
q5	7761	3068	3081	3068
q6	234	142	142	142
q7	1045	602	605	602
q8	9348	1938	2037	1938
q9	6499	6449	6472	6449
q10	7114	2433	2409	2409
q11	456	253	248	248
q12	409	214	204	204
q13	17825	2994	2993	2993
q14	244	227	212	212
q15	571	503	512	503
q16	663	580	582	580
q17	967	601	538	538
q18	7341	6601	6779	6601
q19	1343	1053	1034	1034
q20	478	183	186	183
q21	3945	3142	3277	3142
q22	1115	1019	997	997
Total cold run time: 108164 ms
Total hot run time: 41166 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7341	7287	7234	7234
q2	327	227	235	227
q3	2934	2930	2932	2930
q4	2065	1869	1796	1796
q5	5726	5790	5754	5754
q6	227	140	142	140
q7	2208	1851	1799	1799
q8	3324	3558	3436	3436
q9	8970	8957	8908	8908
q10	3587	3566	3557	3557
q11	588	482	478	478
q12	848	625	628	625
q13	9967	3214	3171	3171
q14	308	275	272	272
q15	584	530	522	522
q16	720	653	652	652
q17	1856	1603	1614	1603
q18	8269	7743	7537	7537
q19	1699	1637	1592	1592
q20	2127	1874	1847	1847
q21	5606	5468	5334	5334
q22	1133	1023	1036	1023
Total cold run time: 70414 ms
Total hot run time: 60437 ms

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Oct 30, 2024
@924060929
Copy link
Contributor Author

run buildall

sql "set enable_fold_constant_by_be=false"
test {
sql sqlStr
time 60000
Copy link
Contributor

Choose a reason for hiding this comment

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

is it acceptable in P0 rather than P1?

Copy link
Contributor Author

@924060929 924060929 Oct 30, 2024

Choose a reason for hiding this comment

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

It should be fast(200ms), so we don't need to move to p1

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17622	7493	7297	7297
q2	2048	162	171	162
q3	10553	1151	1148	1148
q4	10231	874	787	787
q5	7773	3183	3113	3113
q6	238	151	150	150
q7	1035	608	610	608
q8	9614	1983	2024	1983
q9	8026	6456	6495	6456
q10	7147	2457	2412	2412
q11	449	250	246	246
q12	499	216	208	208
q13	17777	3028	3044	3028
q14	246	216	217	216
q15	575	515	519	515
q16	657	582	574	574
q17	990	618	495	495
q18	7374	6720	6636	6636
q19	1346	1042	926	926
q20	479	176	177	176
q21	4030	3165	3173	3165
q22	1137	1028	1003	1003
Total cold run time: 109846 ms
Total hot run time: 41304 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7292	7266	7241	7241
q2	330	224	220	220
q3	2990	2747	2756	2747
q4	1968	1704	1681	1681
q5	5461	5517	5515	5515
q6	214	136	138	136
q7	2144	1722	1719	1719
q8	3234	3387	3410	3387
q9	8645	8593	8606	8593
q10	3523	3499	3461	3461
q11	586	491	476	476
q12	774	577	602	577
q13	3808	3083	3041	3041
q14	294	270	262	262
q15	574	512	496	496
q16	669	620	640	620
q17	1878	1607	1564	1564
q18	7750	7570	7561	7561
q19	1673	1626	1607	1607
q20	2091	1808	1802	1802
q21	5441	5290	5339	5290
q22	1136	1025	1001	1001
Total cold run time: 62475 ms
Total hot run time: 58997 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191264 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 00bdabe909492d70e574032ae4d963c01f8a0120, data reload: false

query1	971	385	367	367
query2	6497	2085	1985	1985
query3	6732	217	227	217
query4	33543	23707	23565	23565
query5	3559	444	423	423
query6	257	168	162	162
query7	4471	288	292	288
query8	294	215	217	215
query9	9428	2726	2687	2687
query10	426	263	246	246
query11	18152	15228	15320	15228
query12	157	102	103	102
query13	1604	435	416	416
query14	9328	6933	6844	6844
query15	203	177	173	173
query16	6746	465	471	465
query17	1087	561	551	551
query18	1862	295	300	295
query19	379	153	155	153
query20	115	115	107	107
query21	158	106	103	103
query22	4620	4157	4282	4157
query23	34688	34200	34073	34073
query24	11214	2736	2775	2736
query25	658	399	388	388
query26	1504	158	160	158
query27	2833	287	279	279
query28	7943	2471	2434	2434
query29	961	423	425	423
query30	332	168	165	165
query31	1004	803	832	803
query32	102	58	61	58
query33	786	270	268	268
query34	1001	505	520	505
query35	1043	889	902	889
query36	1115	941	939	939
query37	136	77	74	74
query38	4427	4289	4263	4263
query39	1502	1417	1417	1417
query40	246	103	103	103
query41	49	48	45	45
query42	107	98	96	96
query43	542	493	490	490
query44	1247	817	815	815
query45	180	166	164	164
query46	1133	723	704	704
query47	1955	1862	1884	1862
query48	437	316	327	316
query49	1215	396	391	391
query50	814	380	388	380
query51	7223	6943	6912	6912
query52	101	91	91	91
query53	260	182	177	177
query54	1314	413	412	412
query55	79	81	81	81
query56	276	240	260	240
query57	1277	1201	1194	1194
query58	247	226	215	215
query59	3344	2944	2998	2944
query60	289	259	282	259
query61	116	98	99	98
query62	867	667	673	667
query63	217	180	185	180
query64	4880	632	607	607
query65	3290	3181	3214	3181
query66	1420	308	307	307
query67	16293	15731	15787	15731
query68	4799	548	556	548
query69	421	261	254	254
query70	1171	1145	1164	1145
query71	387	254	242	242
query72	6254	3967	4046	3967
query73	753	354	356	354
query74	10278	8989	9061	8989
query75	3408	2662	2683	2662
query76	2913	1083	1111	1083
query77	405	269	262	262
query78	10414	9669	9495	9495
query79	1379	598	597	597
query80	956	432	417	417
query81	558	237	237	237
query82	978	115	115	115
query83	217	138	132	132
query84	283	71	68	68
query85	1303	316	282	282
query86	369	272	299	272
query87	4963	4626	4759	4626
query88	3455	2186	2139	2139
query89	394	287	291	287
query90	1988	185	182	182
query91	131	107	97	97
query92	57	54	53	53
query93	1085	547	539	539
query94	963	262	285	262
query95	341	239	246	239
query96	612	277	273	273
query97	2900	2743	2671	2671
query98	210	195	205	195
query99	1535	1297	1307	1297
Total cold run time: 297136 ms
Total hot run time: 191264 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.03	0.03
query3	0.24	0.06	0.06
query4	1.63	0.10	0.10
query5	0.41	0.39	0.41
query6	1.16	0.65	0.66
query7	0.02	0.03	0.02
query8	0.04	0.04	0.02
query9	0.56	0.49	0.50
query10	0.54	0.54	0.55
query11	0.14	0.10	0.11
query12	0.14	0.12	0.10
query13	0.60	0.59	0.60
query14	2.71	2.73	2.75
query15	0.90	0.83	0.82
query16	0.38	0.39	0.38
query17	0.96	1.05	1.07
query18	0.20	0.20	0.20
query19	2.03	1.90	1.96
query20	0.02	0.01	0.01
query21	15.38	0.62	0.56
query22	2.79	3.02	2.63
query23	16.89	0.83	0.78
query24	2.82	1.48	1.28
query25	0.14	0.04	0.14
query26	0.65	0.14	0.14
query27	0.04	0.04	0.03
query28	10.22	1.09	1.07
query29	12.52	3.29	3.30
query30	0.24	0.07	0.06
query31	2.85	0.39	0.38
query32	3.27	0.46	0.45
query33	3.02	3.02	3.06
query34	17.09	4.46	4.48
query35	4.49	4.51	4.52
query36	0.66	0.51	0.48
query37	0.08	0.06	0.06
query38	0.04	0.04	0.03
query39	0.03	0.03	0.02
query40	0.15	0.13	0.13
query41	0.08	0.03	0.02
query42	0.04	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.32 s
Total hot run time: 33.7 s

@924060929 924060929 changed the title [fi](Nerieds) fix FoldConstantRuleOnFE too slow when CaseWhen clause nesting multiple layers [fix](Nerieds) fix FoldConstantRuleOnFE too slow when CaseWhen clause nesting multiple layers Oct 30, 2024
morrySnow pushed a commit that referenced this pull request Oct 31, 2024
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 31, 2024
@morrySnow morrySnow removed the approved Indicates a PR has been approved by one committer. label Oct 31, 2024
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 31, 2024
@github-actions
Copy link
Contributor

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

@starocean999 starocean999 merged commit 91569c0 into apache:master Oct 31, 2024
github-actions bot pushed a commit that referenced this pull request Oct 31, 2024
… nesting multiple layers (#42897)

## Proposed changes

fix FoldConstantRuleOnFE too slow when CaseWhen clause nesting multiple
layers.
morrySnow pushed a commit that referenced this pull request Oct 31, 2024
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.7-merged dev/3.0.3-merged p0_b reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants