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

[Improvement](nereids) Support join derivation when mv rewrite #29609

Merged

Conversation

seawinde
Copy link
Contributor

@seawinde seawinde commented Jan 5, 2024

Proposed changes

materialized view def is as following:

       select l_linenumber, o_custkey
      from orders
       left join lineitem on lineitem.L_ORDERKEY = orders.O_ORDERKEY
       where o_custkey = 1;

when query is as following, it can be rewritten by mv above
it requires that query has reject null filters on the join right input,
current supported filter are "=", "<", "<=", ">", ">=", "<=>"

       select IFNULL(orders.O_CUSTKEY, 0) as custkey_not_null,
      case when l_linenumber in (1,2,3) then l_linenumber else o_custkey end as case_when
       from orders
       inner join lineitem on orders.O_ORDERKEY = lineitem.L_ORDERKEY
       where o_custkey = 1 and l_linenumber > 0;

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@seawinde seawinde force-pushed the support_join_derivation_when_mv_rewrite branch from bdcf648 to 5fe7e10 Compare January 7, 2024 09:19
@seawinde
Copy link
Contributor Author

seawinde commented Jan 7, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17679	4979	4949	4949
q2	2020	162	145	145
q3	10783	1092	1104	1092
q4	10516	818	830	818
q5	7797	2991	3025	2991
q6	206	121	120	120
q7	923	524	497	497
q8	9314	1976	1997	1976
q9	6432	6412	6332	6332
q10	8247	2996	3000	2996
q11	444	224	215	215
q12	393	229	235	229
q13	18004	3424	3385	3385
q14	234	207	206	206
q15	543	512	503	503
q16	456	394	398	394
q17	977	671	521	521
q18	7445	6703	6727	6703
q19	1587	1525	1525	1525
q20	710	326	316	316
q21	2813	2442	2385	2385
q22	354	303	308	303
Total cold run time: 107877 ms
Total hot run time: 38601 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4928	4906	4949	4906
q2	340	227	236	227
q3	3319	3291	3284	3284
q4	2111	2021	2027	2021
q5	5817	5791	5803	5791
q6	207	115	116	115
q7	2276	1948	1956	1948
q8	3359	3427	3474	3427
q9	8851	8757	8765	8757
q10	3798	3840	3822	3822
q11	528	443	431	431
q12	788	635	634	634
q13	5550	3213	3204	3204
q14	293	278	264	264
q15	551	504	493	493
q16	541	502	505	502
q17	1872	1858	1869	1858
q18	8616	8474	8203	8203
q19	1589	1637	1628	1628
q20	2177	1951	1983	1951
q21	5646	5264	5318	5264
q22	507	483	469	469
Total cold run time: 63664 ms
Total hot run time: 59199 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184660 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 5fe7e106501aa904b2664d8b90120cdaede6e8f8, data reload: false

run tpcds-sf100 query with default conf and session variables
query1	947	346	333	333
query2	6549	2024	2007	2007
query3	6717	222	217	217
query4	26603	22438	22429	22429
query5	5980	584	608	584
query6	348	232	212	212
query7	4635	309	302	302
query8	249	236	217	217
query9	8683	2904	2930	2904
query10	578	316	333	316
query11	15951	15631	15633	15631
query12	162	96	103	96
query13	1673	337	338	337
query14	12187	7672	7603	7603
query15	265	234	204	204
query16	6321	348	334	334
query17	1642	525	524	524
query18	1977	331	300	300
query19	238	162	158	158
query20	108	98	97	97
query21	188	94	92	92
query22	5070	4899	4783	4783
query23	32240	31664	31469	31469
query24	12443	2983	2996	2983
query25	583	385	369	369
query26	1796	169	166	166
query27	2878	312	308	308
query28	6808	2131	2121	2121
query29	1918	428	411	411
query30	295	143	149	143
query31	1024	844	811	811
query32	136	84	73	73
query33	844	343	338	338
query34	863	477	483	477
query35	986	858	894	858
query36	1343	1229	1296	1229
query37	212	94	91	91
query38	3491	3391	3316	3316
query39	1330	1325	1310	1310
query40	303	86	93	86
query41	39	36	41	36
query42	109	104	103	103
query43	557	539	515	515
query44	1285	795	768	768
query45	210	205	200	200
query46	1047	692	692	692
query47	1740	1696	1598	1598
query48	356	279	292	279
query49	1187	298	307	298
query50	755	323	332	323
query51	5411	5304	5327	5304
query52	111	97	99	97
query53	233	165	164	164
query54	1420	682	721	682
query55	109	101	95	95
query56	264	270	261	261
query57	1092	972	1056	972
query58	300	285	292	285
query59	3163	2890	2905	2890
query60	317	296	281	281
query61	140	158	142	142
query62	568	460	490	460
query63	191	173	181	173
query64	5549	1711	1758	1711
query65	3409	3329	3316	3316
query66	1234	410	409	409
query67	15873	15271	15635	15271
query68	13292	543	538	538
query69	637	322	300	300
query70	1768	1613	1663	1613
query71	591	300	294	294
query72	5628	3568	3539	3539
query73	3119	344	347	344
query74	7485	6556	6531	6531
query75	5572	2309	2301	2301
query76	6478	1141	1118	1118
query77	780	331	332	331
query78	9136	8612	8684	8612
query79	1701	528	539	528
query80	550	369	348	348
query81	465	216	208	208
query82	227	119	106	106
query83	196	146	142	142
query84	252	57	60	57
query85	948	297	282	282
query86	432	440	396	396
query87	3620	3475	3485	3475
query88	3053	2479	2504	2479
query89	376	306	296	296
query90	1945	254	257	254
query91	134	98	95	95
query92	96	81	79	79
query93	1187	489	494	489
query94	920	250	252	250
query95	583	512	515	512
query96	631	338	340	338
query97	4411	4176	4239	4176
query98	258	218	215	215
query99	1168	898	850	850
Total cold run time: 300872 ms
Total hot run time: 184660 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.81 seconds
stream load tsv: 563 seconds loaded 74807831229 Bytes, about 126 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 27.4 seconds inserted 10000000 Rows, about 364K ops/s
storage size: 17188468012 Bytes

@seawinde
Copy link
Contributor Author

seawinde commented Jan 8, 2024

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.61 seconds
stream load tsv: 576 seconds loaded 74807831229 Bytes, about 123 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 27.1 seconds inserted 10000000 Rows, about 369K ops/s
storage size: 17184247720 Bytes

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17675	4873	4897	4873
q2	2010	152	143	143
q3	10660	1135	1158	1135
q4	10550	791	800	791
q5	7776	2966	2930	2930
q6	207	122	123	122
q7	905	511	497	497
q8	9275	1946	1976	1946
q9	6403	6396	6315	6315
q10	8279	3108	3010	3010
q11	426	229	204	204
q12	390	226	221	221
q13	17992	3368	3348	3348
q14	233	206	209	206
q15	546	513	509	509
q16	445	399	406	399
q17	970	703	591	591
q18	7251	6653	6613	6613
q19	1557	1505	1503	1503
q20	727	325	316	316
q21	2742	2408	2430	2408
q22	361	302	327	302
Total cold run time: 107380 ms
Total hot run time: 38382 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4960	4904	4906	4904
q2	337	232	249	232
q3	3287	3287	3271	3271
q4	2107	2024	2013	2013
q5	5775	5771	5777	5771
q6	202	115	113	113
q7	2314	1890	1911	1890
q8	3361	3439	3441	3439
q9	8744	8653	8705	8653
q10	3791	3823	3837	3823
q11	554	452	458	452
q12	783	634	641	634
q13	5622	3176	3177	3176
q14	303	260	290	260
q15	548	501	511	501
q16	547	499	495	495
q17	1853	1860	1842	1842
q18	8619	8351	8270	8270
q19	1570	1612	1622	1612
q20	2179	1950	1943	1943
q21	5588	5258	5254	5254
q22	513	483	439	439
Total cold run time: 63557 ms
Total hot run time: 58987 ms

@doris-robot
Copy link

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

run tpcds-sf100 query with default conf and session variables
query1	932	348	331	331
query2	6550	2033	2129	2033
query3	6725	225	224	224
query4	26323	22518	22407	22407
query5	6173	560	600	560
query6	348	210	204	204
query7	4639	303	300	300
query8	255	218	223	218
query9	8636	2928	2990	2928
query10	606	324	318	318
query11	16373	15274	15618	15274
query12	162	97	104	97
query13	1679	345	348	345
query14	12613	7660	7698	7660
query15	285	225	217	217
query16	6392	334	331	331
query17	1696	535	498	498
query18	1968	308	300	300
query19	253	159	162	159
query20	110	101	103	101
query21	183	94	99	94
query22	5049	4842	4758	4758
query23	32500	31433	31573	31433
query24	10899	2936	2969	2936
query25	595	352	365	352
query26	1335	169	193	169
query27	2791	304	310	304
query28	6820	2168	2161	2161
query29	1060	426	407	407
query30	280	147	153	147
query31	1013	817	805	805
query32	134	96	86	86
query33	828	354	343	343
query34	831	467	476	467
query35	996	875	846	846
query36	1396	1183	1270	1183
query37	128	93	93	93
query38	3507	3341	3357	3341
query39	1353	1293	1309	1293
query40	186	90	85	85
query41	40	38	42	38
query42	106	106	111	106
query43	554	515	522	515
query44	1167	830	818	818
query45	222	206	219	206
query46	1066	696	693	693
query47	1757	1673	1716	1673
query48	377	285	297	285
query49	1072	313	307	307
query50	723	328	322	322
query51	5439	5341	5256	5256
query52	109	111	94	94
query53	247	165	164	164
query54	1428	703	726	703
query55	107	98	98	98
query56	267	253	267	253
query57	1050	1040	995	995
query58	305	284	290	284
query59	3130	2923	2906	2906
query60	356	300	291	291
query61	136	152	151	151
query62	590	487	475	475
query63	198	183	167	167
query64	4949	1680	1732	1680
query65	3424	3349	3366	3349
query66	998	387	409	387
query67	15652	15553	15202	15202
query68	13838	578	547	547
query69	592	316	329	316
query70	1967	1652	1522	1522
query71	583	294	295	294
query72	5447	3428	3444	3428
query73	3399	346	343	343
query74	6956	6574	6513	6513
query75	5443	2350	2273	2273
query76	6488	1168	1156	1156
query77	787	304	353	304
query78	9045	8556	8748	8556
query79	2193	559	523	523
query80	593	349	347	347
query81	485	220	220	220
query82	236	105	106	105
query83	194	143	139	139
query84	260	58	61	58
query85	938	279	277	277
query86	432	445	437	437
query87	3605	3488	3416	3416
query88	3051	2503	2520	2503
query89	372	274	289	274
query90	1937	259	230	230
query91	125	97	98	97
query92	91	78	83	78
query93	1207	497	490	490
query94	921	255	246	246
query95	590	504	485	485
query96	638	338	342	338
query97	4326	4368	4245	4245
query98	237	217	220	217
query99	1135	849	840	840
Total cold run time: 298182 ms
Total hot run time: 184043 ms

Comment on lines 445 to 417
return SplitPredicate.empty();
}
Copy link
Contributor

@keanji-x keanji-x Jan 8, 2024

Choose a reason for hiding this comment

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

what is empty splitPredicate meaning

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe an invalid instance is better

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 means invalid, i will change it more semantic

comparisonResult);
// if the join type in query and mv plan is different, we should check and add filter on mv to make
// the mv join type is accord with query
Set<Set<Slot>> viewNoNullableSlot = comparisonResult.getViewNoNullableSlot();
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe requireNoNullableSlot name is better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, it's better

Comment on lines 443 to 444
if (viewNoNullableSlot.stream().anyMatch(
set -> Sets.intersection(set, queryUsedRejectNullSlotsViewBased).isEmpty())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be allMatch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

empty splitPredicate is invalid, so this should be anymatch

@@ -39,4 +43,9 @@ public FunctionSignature customSignature() {
return FunctionSignature.ret(dataType).args(dataType);
}

@Override
public Expression withChildren(List<Expression> children) {
Preconditions.checkArgument(children.size() == 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

add check msg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@@ -39,4 +43,9 @@ public FunctionSignature customSignature() {
return FunctionSignature.ret(dataType).args(dataType);
}

@Override
public Expression withChildren(List<Expression> children) {
Preconditions.checkArgument(children.size() == 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

add check msg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I will fix it

@seawinde seawinde force-pushed the support_join_derivation_when_mv_rewrite branch 2 times, most recently from 199a7ce to 10c402c Compare January 8, 2024 09:05
@seawinde
Copy link
Contributor Author

seawinde commented Jan 8, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17656	4979	5019	4979
q2	2035	160	146	146
q3	10814	1111	1226	1111
q4	10526	823	834	823
q5	7784	3026	3062	3026
q6	208	123	125	123
q7	921	521	499	499
q8	9313	2022	2005	2005
q9	6513	6426	6384	6384
q10	8267	3065	3048	3048
q11	433	228	222	222
q12	397	229	233	229
q13	18003	3421	3400	3400
q14	244	208	199	199
q15	542	505	501	501
q16	468	401	395	395
q17	960	746	589	589
q18	7391	6702	6669	6669
q19	1566	1548	1527	1527
q20	708	319	314	314
q21	2760	2416	2391	2391
q22	353	307	326	307
Total cold run time: 107862 ms
Total hot run time: 38887 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4994	4994	4982	4982
q2	342	229	252	229
q3	3318	3314	3291	3291
q4	2142	2022	2020	2020
q5	5810	5790	5825	5790
q6	204	114	120	114
q7	2322	1875	1916	1875
q8	3398	3459	3496	3459
q9	8822	8844	8844	8844
q10	3793	3857	3857	3857
q11	531	463	451	451
q12	796	633	638	633
q13	7002	3203	3209	3203
q14	286	268	270	268
q15	543	507	512	507
q16	540	497	503	497
q17	1887	1862	1862	1862
q18	8623	8443	8243	8243
q19	1614	1666	1649	1649
q20	2187	1986	1939	1939
q21	5622	5286	5350	5286
q22	523	484	466	466
Total cold run time: 65299 ms
Total hot run time: 59465 ms

@doris-robot
Copy link

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

run tpcds-sf100 query with default conf and session variables
query1	857	345	344	344
query2	4789	2033	1934	1934
query3	5038	234	220	220
query4	26239	22445	22479	22445
query5	4833	650	608	608
query6	322	206	207	206
query7	4393	302	305	302
query8	237	230	227	227
query9	7968	2947	3013	2947
query10	527	357	367	357
query11	15879	15798	15630	15630
query12	169	107	105	105
query13	1450	350	340	340
query14	11349	7824	7622	7622
query15	256	226	228	226
query16	6256	354	339	339
query17	1406	532	532	532
query18	1911	302	322	302
query19	213	167	164	164
query20	105	103	102	102
query21	161	96	100	96
query22	5066	4701	4793	4701
query23	32757	31270	31632	31270
query24	11647	2987	2975	2975
query25	598	364	366	364
query26	1633	171	187	171
query27	2843	324	320	320
query28	6328	2159	2133	2133
query29	1679	428	435	428
query30	277	144	149	144
query31	1008	854	833	833
query32	125	79	75	75
query33	806	356	344	344
query34	861	482	472	472
query35	985	910	919	910
query36	1406	1257	1316	1257
query37	190	84	81	81
query38	3508	3373	3358	3358
query39	1342	1306	1313	1306
query40	290	94	84	84
query41	40	37	36	36
query42	112	108	103	103
query43	558	518	538	518
query44	1185	803	815	803
query45	215	213	202	202
query46	1061	737	709	709
query47	1789	1661	1626	1626
query48	366	299	293	293
query49	996	328	336	328
query50	807	362	334	334
query51	5518	5297	5300	5297
query52	110	94	102	94
query53	233	169	183	169
query54	1082	761	703	703
query55	106	95	99	95
query56	267	242	258	242
query57	1057	1002	975	975
query58	308	268	270	268
query59	3055	2852	2890	2852
query60	328	304	290	290
query61	132	159	155	155
query62	597	496	514	496
query63	210	183	182	182
query64	5363	1777	1705	1705
query65	3430	3339	3362	3339
query66	1336	413	380	380
query67	15812	15690	15329	15329
query68	13173	574	554	554
query69	648	323	306	306
query70	1745	1570	1648	1570
query71	614	300	270	270
query72	5525	3476	3438	3438
query73	3183	344	350	344
query74	7088	6592	6534	6534
query75	5869	2286	2271	2271
query76	6413	1045	1232	1045
query77	898	338	328	328
query78	9045	8643	8498	8498
query79	1084	543	541	541
query80	517	348	342	342
query81	431	226	221	221
query82	221	113	105	105
query83	189	142	143	142
query84	252	59	58	58
query85	726	283	285	283
query86	437	438	433	433
query87	3679	3449	3464	3449
query88	3305	2529	2525	2525
query89	382	296	276	276
query90	2069	268	264	264
query91	127	92	95	92
query92	100	73	72	72
query93	1433	507	434	434
query94	946	260	250	250
query95	589	507	504	504
query96	697	338	342	338
query97	4374	4314	4416	4314
query98	239	220	213	213
query99	1158	897	880	880
Total cold run time: 290936 ms
Total hot run time: 184691 ms

Copy link
Contributor

github-actions bot commented Jan 8, 2024

PR approved by anyone and no changes requested.

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.44 seconds
stream load tsv: 568 seconds loaded 74807831229 Bytes, about 125 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.2 seconds inserted 10000000 Rows, about 354K ops/s
storage size: 17184368989 Bytes

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

github-actions bot commented Jan 8, 2024

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

@seawinde seawinde force-pushed the support_join_derivation_when_mv_rewrite branch from 1fcbc71 to 7119dc1 Compare January 9, 2024 05:12
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jan 9, 2024
@seawinde
Copy link
Contributor Author

seawinde commented Jan 9, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17652	4998	4969	4969
q2	2027	155	145	145
q3	10750	1155	1100	1100
q4	10528	815	776	776
q5	7783	2931	2913	2913
q6	205	127	124	124
q7	921	509	509	509
q8	9249	1998	2019	1998
q9	6479	6401	6409	6401
q10	8219	3067	3006	3006
q11	429	219	216	216
q12	390	227	222	222
q13	17997	3390	3391	3390
q14	232	222	199	199
q15	548	517	509	509
q16	449	416	379	379
q17	966	659	533	533
q18	7488	6720	6642	6642
q19	1586	1518	1537	1518
q20	711	335	317	317
q21	2760	2399	2363	2363
q22	358	310	324	310
Total cold run time: 107727 ms
Total hot run time: 38539 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4947	4929	4933	4929
q2	355	240	230	230
q3	3287	3294	3275	3275
q4	2117	2000	2005	2000
q5	5790	5773	5758	5758
q6	206	115	116	115
q7	2328	1918	1888	1888
q8	3392	3443	3512	3443
q9	8810	8768	8802	8768
q10	3813	3880	3868	3868
q11	536	455	440	440
q12	793	632	616	616
q13	5255	3195	3178	3178
q14	310	257	254	254
q15	550	500	508	500
q16	566	494	483	483
q17	1869	1884	1883	1883
q18	8731	8387	8312	8312
q19	1625	1651	1643	1643
q20	2232	1964	1959	1959
q21	5573	5309	5200	5200
q22	520	446	489	446
Total cold run time: 63605 ms
Total hot run time: 59188 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184953 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 7119dc1694b7888e5232f3ad64a47827e63ebaa6, data reload: false

run tpcds-sf100 query with default conf and session variables
query1	949	343	342	342
query2	4151	2066	1887	1887
query3	8103	232	240	232
query4	27974	22528	22390	22390
query5	6112	566	628	566
query6	410	204	201	201
query7	5536	296	312	296
query8	249	235	231	231
query9	8775	2858	2867	2858
query10	525	325	342	325
query11	16365	15725	15637	15637
query12	172	96	101	96
query13	1642	340	335	335
query14	12443	7492	7670	7492
query15	246	207	204	204
query16	5947	342	304	304
query17	1403	533	514	514
query18	1856	302	306	302
query19	299	164	159	159
query20	105	98	97	97
query21	191	92	99	92
query22	5022	4823	4748	4748
query23	32215	31677	31650	31650
query24	11470	2956	2900	2900
query25	561	362	370	362
query26	1420	185	166	166
query27	2775	309	314	309
query28	6935	2154	2146	2146
query29	1193	434	425	425
query30	284	143	154	143
query31	1056	849	814	814
query32	111	80	88	80
query33	829	352	350	350
query34	876	457	480	457
query35	1010	861	883	861
query36	1420	1273	1239	1239
query37	181	86	84	84
query38	3532	3401	3344	3344
query39	1344	1283	1293	1283
query40	263	88	97	88
query41	38	38	38	38
query42	123	103	115	103
query43	568	502	543	502
query44	1159	797	812	797
query45	220	205	199	199
query46	1120	711	690	690
query47	1700	1645	1624	1624
query48	373	293	298	293
query49	1052	326	318	318
query50	747	314	335	314
query51	5385	5318	5294	5294
query52	119	95	97	95
query53	238	168	169	168
query54	1463	656	675	656
query55	104	109	106	106
query56	298	241	262	241
query57	1076	1033	999	999
query58	324	274	269	269
query59	2930	2885	2899	2885
query60	323	300	280	280
query61	163	135	149	135
query62	610	489	483	483
query63	200	203	172	172
query64	4857	1845	1792	1792
query65	3431	3345	3358	3345
query66	1251	402	375	375
query67	15911	15704	15864	15704
query68	12741	554	552	552
query69	640	321	329	321
query70	1770	1526	1646	1526
query71	617	256	292	256
query72	6016	3571	3580	3571
query73	2837	341	343	341
query74	7021	6711	6637	6637
query75	5818	2336	2319	2319
query76	6460	1139	1193	1139
query77	784	352	351	351
query78	9082	8542	8527	8527
query79	1090	530	529	529
query80	581	353	359	353
query81	451	210	211	210
query82	214	110	107	107
query83	186	150	148	148
query84	256	57	59	57
query85	949	295	287	287
query86	449	442	452	442
query87	3641	3481	3446	3446
query88	2962	2482	2537	2482
query89	368	299	290	290
query90	1980	260	231	231
query91	177	99	101	99
query92	85	84	67	67
query93	1232	436	482	436
query94	921	240	246	240
query95	584	514	494	494
query96	631	333	351	333
query97	4370	4246	4194	4194
query98	234	220	218	218
query99	1171	864	873	864
Total cold run time: 298051 ms
Total hot run time: 184953 ms

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.73 seconds
stream load tsv: 587 seconds loaded 74807831229 Bytes, about 121 MB/s
stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 27.6 seconds inserted 10000000 Rows, about 362K ops/s
storage size: 17184109690 Bytes

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

github-actions bot commented Jan 9, 2024

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

@morrySnow morrySnow merged commit 492df1c into apache:master Jan 9, 2024
17 checks passed
yiguolei pushed a commit that referenced this pull request Jan 12, 2024
materialized view def is as following:
>            select l_linenumber, o_custkey
>           from orders
>            left join lineitem on lineitem.L_ORDERKEY = orders.O_ORDERKEY
>            where o_custkey = 1;

when query is as following, it can be rewritten by mv above
it requires that query has reject null filters on the join right input, 
current supported filter are  "=", "<", "<=", ">", ">=", "<=>" 
>            select IFNULL(orders.O_CUSTKEY, 0) as custkey_not_null,
>           case when l_linenumber in (1,2,3) then l_linenumber else o_custkey end as case_when
>            from orders
>            inner join lineitem on orders.O_ORDERKEY = lineitem.L_ORDERKEY
>            where o_custkey = 1 and l_linenumber > 0;
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Jan 12, 2024
…e#29609)

materialized view def is as following:
>            select l_linenumber, o_custkey
>           from orders
>            left join lineitem on lineitem.L_ORDERKEY = orders.O_ORDERKEY
>            where o_custkey = 1;

when query is as following, it can be rewritten by mv above
it requires that query has reject null filters on the join right input, 
current supported filter are  "=", "<", "<=", ">", ">=", "<=>" 
>            select IFNULL(orders.O_CUSTKEY, 0) as custkey_not_null,
>           case when l_linenumber in (1,2,3) then l_linenumber else o_custkey end as case_when
>            from orders
>            inner join lineitem on orders.O_ORDERKEY = lineitem.L_ORDERKEY
>            where o_custkey = 1 and l_linenumber > 0;
seawinde added a commit to seawinde/doris that referenced this pull request Jan 24, 2024
…e#29609)

materialized view def is as following:
>            select l_linenumber, o_custkey
>           from orders
>            left join lineitem on lineitem.L_ORDERKEY = orders.O_ORDERKEY
>            where o_custkey = 1;

when query is as following, it can be rewritten by mv above
it requires that query has reject null filters on the join right input,
current supported filter are  "=", "<", "<=", ">", ">=", "<=>"
>            select IFNULL(orders.O_CUSTKEY, 0) as custkey_not_null,
>           case when l_linenumber in (1,2,3) then l_linenumber else o_custkey end as case_when
>            from orders
>            inner join lineitem on orders.O_ORDERKEY = lineitem.L_ORDERKEY
>            where o_custkey = 1 and l_linenumber > 0;
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/3.0.0-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants