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](cloud) Accelerate creating table by batching RPC In cloud #36786

Merged
merged 7 commits into from
Jul 14, 2024

Conversation

deardeng
Copy link
Contributor

@deardeng deardeng commented Jun 25, 2024

Create dynamic partitions, optimize from calling prepare rpc and commit
rpc multiple times to only calling prepare and commit once

in one server(fe/ms)

before optimize:
Query OK, 0 rows affected (16.96 sec)
Query OK, 0 rows affected (16.65 sec)
Query OK, 0 rows affected (16.26 sec)
Query OK, 0 rows affected (16.39 sec)
Query OK, 0 rows affected (17.15 sec)

after optimize:
Query OK, 0 rows affected (13.31 sec)
Query OK, 0 rows affected (11.71 sec)
Query OK, 0 rows affected (11.81 sec)
Query OK, 0 rows affected (11.55 sec)
Query OK, 0 rows affected (12.07 sec)

......
734 rows in set (1.06 sec)

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

@deardeng deardeng marked this pull request as draft June 25, 2024 03:10
@deardeng
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment on lines 374 to 375
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow]

Suggested change
return;
}
}

cloud/src/meta-service/meta_service_partition.cpp Outdated Show resolved Hide resolved
@deardeng deardeng marked this pull request as ready for review June 25, 2024 03:46
@dataroaring
Copy link
Contributor

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18258	4883	4456	4456
q2	2999	193	186	186
q3	11283	1116	1112	1112
q4	10367	890	807	807
q5	7515	2754	2645	2645
q6	225	135	132	132
q7	956	606	624	606
q8	9551	2073	2076	2073
q9	9003	6561	6514	6514
q10	9020	3752	3706	3706
q11	468	235	236	235
q12	439	222	225	222
q13	17783	2982	3038	2982
q14	268	222	224	222
q15	515	462	472	462
q16	483	378	370	370
q17	975	646	632	632
q18	8013	7461	7452	7452
q19	1761	1537	1553	1537
q20	646	319	323	319
q21	4985	3930	4029	3930
q22	400	354	346	346
Total cold run time: 115913 ms
Total hot run time: 40946 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4387	4282	4239	4239
q2	377	278	261	261
q3	2950	2783	2735	2735
q4	1889	1620	1623	1620
q5	5255	5273	5341	5273
q6	217	128	126	126
q7	2143	1784	1747	1747
q8	3238	3360	3327	3327
q9	8399	8379	8306	8306
q10	3879	3647	3743	3647
q11	587	500	477	477
q12	792	596	595	595
q13	16676	2992	2973	2973
q14	300	250	282	250
q15	525	491	483	483
q16	477	417	415	415
q17	1777	1470	1461	1461
q18	7634	7550	7326	7326
q19	4530	1681	1617	1617
q20	1993	1772	1762	1762
q21	4900	4622	4713	4622
q22	629	574	540	540
Total cold run time: 73554 ms
Total hot run time: 53802 ms

@doris-robot
Copy link

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

query1	916	388	372	372
query2	6422	2445	2243	2243
query3	6642	202	209	202
query4	19442	17396	17262	17262
query5	4167	470	461	461
query6	250	157	162	157
query7	4573	298	288	288
query8	306	290	296	290
query9	8540	2400	2376	2376
query10	590	288	273	273
query11	10485	9923	10011	9923
query12	135	81	80	80
query13	1631	368	387	368
query14	8768	7273	7540	7273
query15	236	189	187	187
query16	7803	261	261	261
query17	1924	523	531	523
query18	1874	290	267	267
query19	201	151	155	151
query20	87	84	81	81
query21	212	129	134	129
query22	4280	4076	4095	4076
query23	33680	33138	33351	33138
query24	11149	2807	2935	2807
query25	653	378	376	376
query26	1466	161	152	152
query27	3019	322	322	322
query28	7508	2086	2085	2085
query29	994	636	633	633
query30	289	152	155	152
query31	945	769	764	764
query32	95	53	56	53
query33	801	296	295	295
query34	935	460	455	455
query35	729	644	618	618
query36	1070	898	946	898
query37	156	76	72	72
query38	2965	2752	2744	2744
query39	888	787	813	787
query40	228	131	124	124
query41	60	54	53	53
query42	124	101	97	97
query43	618	553	565	553
query44	1197	740	739	739
query45	196	166	165	165
query46	1075	712	743	712
query47	1947	1795	1782	1782
query48	372	304	297	297
query49	1101	420	422	420
query50	780	395	380	380
query51	6988	6782	6700	6700
query52	108	103	98	98
query53	359	292	298	292
query54	961	460	453	453
query55	75	77	75	75
query56	301	288	307	288
query57	1148	1044	1065	1044
query58	265	247	256	247
query59	3474	3164	3215	3164
query60	331	293	287	287
query61	113	114	114	114
query62	653	456	450	450
query63	327	294	297	294
query64	10087	2312	1897	1897
query65	3195	3057	3094	3057
query66	1387	375	329	329
query67	15670	15008	15029	15008
query68	9329	561	556	556
query69	750	478	395	395
query70	1313	1117	1101	1101
query71	536	277	281	277
query72	9494	5498	5635	5498
query73	2253	323	326	323
query74	5832	5428	5555	5428
query75	6131	2661	2628	2628
query76	5564	992	976	976
query77	772	306	300	300
query78	10615	9825	10229	9825
query79	8055	517	533	517
query80	770	476	481	476
query81	550	219	220	219
query82	274	98	109	98
query83	357	170	170	170
query84	276	88	84	84
query85	971	339	272	272
query86	351	321	301	301
query87	3316	3082	3073	3073
query88	4746	2362	2353	2353
query89	499	387	379	379
query90	2021	191	185	185
query91	128	99	99	99
query92	67	52	52	52
query93	4451	519	518	518
query94	1425	188	188	188
query95	414	313	308	308
query96	600	270	277	270
query97	3204	3020	3057	3020
query98	224	192	192	192
query99	1042	859	857	857
Total cold run time: 296296 ms
Total hot run time: 173651 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.09	0.04	0.04
query3	0.22	0.05	0.05
query4	1.68	0.08	0.07
query5	0.55	0.49	0.49
query6	1.14	0.72	0.73
query7	0.02	0.02	0.01
query8	0.05	0.04	0.04
query9	0.55	0.48	0.49
query10	0.55	0.56	0.53
query11	0.15	0.11	0.12
query12	0.16	0.12	0.12
query13	0.59	0.59	0.58
query14	0.76	0.77	0.80
query15	0.82	0.81	0.80
query16	0.35	0.37	0.37
query17	1.01	1.03	0.94
query18	0.22	0.26	0.24
query19	1.78	1.71	1.66
query20	0.01	0.01	0.01
query21	15.43	0.65	0.65
query22	4.50	7.83	1.67
query23	18.32	1.38	1.37
query24	2.09	0.23	0.21
query25	0.15	0.08	0.08
query26	0.27	0.17	0.18
query27	0.08	0.09	0.08
query28	13.24	1.02	1.00
query29	12.58	3.32	3.27
query30	0.25	0.06	0.06
query31	2.85	0.40	0.40
query32	3.27	0.47	0.46
query33	2.85	2.94	2.85
query34	17.05	4.41	4.41
query35	4.52	4.51	4.59
query36	0.66	0.46	0.45
query37	0.19	0.16	0.15
query38	0.15	0.14	0.14
query39	0.06	0.03	0.03
query40	0.18	0.15	0.14
query41	0.09	0.05	0.04
query42	0.05	0.05	0.05
query43	0.04	0.05	0.04
Total cold run time: 109.61 s
Total hot run time: 30.3 s

@dataroaring
Copy link
Contributor

run buildall

1 similar comment
@deardeng
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cloud/src/meta-service/meta_service_partition.cpp Outdated Show resolved Hide resolved
@deardeng
Copy link
Contributor Author

run buildall

@deardeng
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18705	4620	4280	4280
q2	2033	193	198	193
q3	10547	1152	1066	1066
q4	10195	854	833	833
q5	7493	2685	2669	2669
q6	221	133	136	133
q7	969	593	600	593
q8	9229	2077	2118	2077
q9	9088	6534	6519	6519
q10	8944	3734	3727	3727
q11	471	238	238	238
q12	403	231	228	228
q13	17773	3004	2984	2984
q14	275	230	236	230
q15	541	480	487	480
q16	517	392	377	377
q17	988	726	722	722
q18	8185	7507	7500	7500
q19	7860	1512	1467	1467
q20	688	333	323	323
q21	4902	3194	3248	3194
q22	400	337	338	337
Total cold run time: 120427 ms
Total hot run time: 40170 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4407	4275	4242	4242
q2	370	270	272	270
q3	2990	2744	2729	2729
q4	1875	1593	1582	1582
q5	5278	5330	5321	5321
q6	219	125	125	125
q7	2138	1777	1707	1707
q8	3183	3385	3358	3358
q9	8436	8368	8399	8368
q10	3866	3602	3675	3602
q11	592	514	495	495
q12	774	584	595	584
q13	17742	3028	2978	2978
q14	305	257	248	248
q15	524	476	492	476
q16	476	409	427	409
q17	1787	1476	1484	1476
q18	7624	7572	7425	7425
q19	1692	1657	1498	1498
q20	2004	1798	1789	1789
q21	4792	4663	4750	4663
q22	635	565	566	565
Total cold run time: 71709 ms
Total hot run time: 53910 ms

@doris-robot
Copy link

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

query1	932	391	378	378
query2	6464	2573	2295	2295
query3	6648	206	219	206
query4	19993	17412	17431	17412
query5	4154	469	472	469
query6	276	169	181	169
query7	4592	295	293	293
query8	335	305	307	305
query9	8643	2438	2426	2426
query10	625	300	277	277
query11	10446	10241	10107	10107
query12	135	90	84	84
query13	1641	362	368	362
query14	9489	7660	6789	6789
query15	250	182	190	182
query16	8118	273	268	268
query17	1914	544	551	544
query18	2007	271	267	267
query19	194	149	161	149
query20	87	84	80	80
query21	223	147	137	137
query22	4401	4060	3999	3999
query23	33833	32976	33113	32976
query24	11252	2840	2754	2754
query25	618	355	365	355
query26	1483	155	150	150
query27	2923	309	311	309
query28	7497	2082	2064	2064
query29	923	640	604	604
query30	270	151	152	151
query31	959	710	772	710
query32	98	51	54	51
query33	788	287	271	271
query34	960	456	465	456
query35	724	638	601	601
query36	1070	922	921	921
query37	147	68	69	68
query38	2868	2743	2748	2743
query39	874	808	799	799
query40	239	124	126	124
query41	56	52	51	51
query42	126	99	95	95
query43	593	561	556	556
query44	1203	709	718	709
query45	190	162	160	160
query46	1080	731	719	719
query47	1860	1819	1814	1814
query48	368	300	298	298
query49	1190	400	399	399
query50	768	384	388	384
query51	6829	6680	6814	6680
query52	105	98	88	88
query53	358	291	280	280
query54	914	442	445	442
query55	76	75	72	72
query56	280	255	262	255
query57	1156	1060	1023	1023
query58	276	258	240	240
query59	3252	3038	3118	3038
query60	304	278	273	273
query61	94	123	95	95
query62	657	435	467	435
query63	318	284	282	282
query64	9631	2200	1727	1727
query65	3168	3097	3082	3082
query66	1060	332	332	332
query67	15503	15252	15063	15063
query68	4880	532	551	532
query69	603	458	412	412
query70	1191	1165	1199	1165
query71	460	280	271	271
query72	7044	5796	5779	5779
query73	782	320	326	320
query74	5908	5602	5523	5523
query75	3620	2640	2664	2640
query76	3368	987	953	953
query77	661	288	290	288
query78	10298	9776	9765	9765
query79	2509	513	500	500
query80	2087	455	462	455
query81	579	220	219	219
query82	793	103	101	101
query83	325	172	167	167
query84	273	90	85	85
query85	1739	281	274	274
query86	482	316	334	316
query87	3278	3133	3116	3116
query88	3702	2418	2414	2414
query89	468	379	368	368
query90	1795	186	185	185
query91	125	101	99	99
query92	61	48	50	48
query93	2467	506	500	500
query94	1255	194	190	190
query95	409	310	313	310
query96	607	272	275	272
query97	3197	3039	3036	3036
query98	230	208	198	198
query99	1439	842	846	842
Total cold run time: 277143 ms
Total hot run time: 173240 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.06
query4	1.62	0.07	0.10
query5	0.52	0.48	0.49
query6	1.14	0.73	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.55	0.49	0.50
query10	0.55	0.54	0.54
query11	0.16	0.11	0.11
query12	0.15	0.12	0.13
query13	0.60	0.59	0.60
query14	0.78	0.77	0.78
query15	0.85	0.81	0.82
query16	0.36	0.36	0.36
query17	1.04	1.05	1.02
query18	0.23	0.25	0.24
query19	1.80	1.72	1.76
query20	0.02	0.01	0.01
query21	15.50	0.75	0.66
query22	3.91	8.09	1.70
query23	18.29	1.40	1.23
query24	2.11	0.21	0.22
query25	0.16	0.09	0.09
query26	0.27	0.18	0.18
query27	0.08	0.08	0.08
query28	13.32	1.03	0.98
query29	12.63	3.27	3.27
query30	0.26	0.06	0.06
query31	2.86	0.38	0.38
query32	3.26	0.47	0.49
query33	2.90	2.92	2.93
query34	17.16	4.38	4.40
query35	4.50	4.45	4.55
query36	0.65	0.46	0.46
query37	0.18	0.15	0.15
query38	0.15	0.15	0.14
query39	0.05	0.03	0.04
query40	0.17	0.15	0.14
query41	0.09	0.05	0.05
query42	0.05	0.04	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.39 s
Total hot run time: 30.33 s

cloud/src/meta-service/meta_service.h Outdated Show resolved Hide resolved
cloud/src/meta-service/meta_service_partition.cpp Outdated Show resolved Hide resolved
cloud/src/meta-service/meta_service_partition.cpp Outdated Show resolved Hide resolved
w41ter
w41ter previously approved these changes Jul 10, 2024
gavinchou
gavinchou previously approved these changes Jul 13, 2024
@gavinchou gavinchou dismissed stale reviews from w41ter and themself via 8503881 July 13, 2024 15:55
@gavinchou
Copy link
Contributor

run buildall

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

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

Copy link
Contributor

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18038	4639	4308	4308
q2	2024	194	187	187
q3	10528	1218	1212	1212
q4	10231	831	886	831
q5	7610	2735	2679	2679
q6	238	141	140	140
q7	964	601	598	598
q8	9235	2093	2125	2093
q9	8631	6604	6559	6559
q10	8776	3800	3822	3800
q11	454	234	241	234
q12	397	238	226	226
q13	18960	2970	3027	2970
q14	288	234	242	234
q15	532	493	494	493
q16	506	380	378	378
q17	1000	722	685	685
q18	8204	7543	7582	7543
q19	5182	1387	1461	1387
q20	666	335	327	327
q21	4924	3244	3303	3244
q22	353	291	289	289
Total cold run time: 117741 ms
Total hot run time: 40417 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4422	4250	4260	4250
q2	366	274	266	266
q3	3001	2742	2780	2742
q4	1891	1643	1671	1643
q5	5343	5368	5338	5338
q6	224	133	134	133
q7	2117	1744	1727	1727
q8	3233	3367	3340	3340
q9	8522	8416	8422	8416
q10	3865	3727	3750	3727
q11	594	480	504	480
q12	762	634	606	606
q13	17498	2945	2943	2943
q14	297	274	273	273
q15	509	488	483	483
q16	511	446	432	432
q17	1804	1498	1474	1474
q18	7802	7709	7364	7364
q19	1669	1597	1534	1534
q20	1962	1780	1788	1780
q21	8275	4802	4788	4788
q22	599	486	503	486
Total cold run time: 75266 ms
Total hot run time: 54225 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172109 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 8503881ee03d2a6966860c677d5500ae2a67d23d, data reload: false

query1	912	376	362	362
query2	6483	1880	1804	1804
query3	6649	205	216	205
query4	28202	17626	17479	17479
query5	4337	481	503	481
query6	283	173	166	166
query7	4602	290	281	281
query8	246	197	189	189
query9	8353	2362	2338	2338
query10	446	291	269	269
query11	10644	10020	10022	10020
query12	127	87	78	78
query13	1642	363	361	361
query14	10173	7664	7695	7664
query15	212	166	164	164
query16	7699	313	303	303
query17	1723	539	521	521
query18	1933	268	273	268
query19	195	145	146	145
query20	87	83	80	80
query21	206	124	125	124
query22	4362	3939	3970	3939
query23	33625	33010	32943	32943
query24	11981	2885	2833	2833
query25	688	359	374	359
query26	1773	147	148	147
query27	2895	269	267	267
query28	7485	1988	1996	1988
query29	1107	626	605	605
query30	286	150	148	148
query31	954	745	773	745
query32	99	56	58	56
query33	781	319	308	308
query34	912	497	484	484
query35	714	583	568	568
query36	1083	926	954	926
query37	190	82	82	82
query38	2848	2752	2785	2752
query39	862	802	805	802
query40	281	124	122	122
query41	49	47	49	47
query42	122	106	108	106
query43	506	474	453	453
query44	1203	747	734	734
query45	193	163	164	163
query46	1093	712	738	712
query47	1816	1739	1757	1739
query48	365	309	295	295
query49	1237	417	404	404
query50	790	403	397	397
query51	6924	6832	6781	6781
query52	107	95	91	91
query53	350	295	286	286
query54	883	449	448	448
query55	75	73	73	73
query56	283	261	263	261
query57	1158	1077	1064	1064
query58	246	234	248	234
query59	2924	2589	2484	2484
query60	326	273	272	272
query61	96	95	93	93
query62	837	648	665	648
query63	316	290	289	289
query64	10449	2269	1687	1687
query65	3533	3104	3111	3104
query66	1397	346	339	339
query67	15674	15417	14945	14945
query68	4606	525	519	519
query69	521	373	339	339
query70	1154	1086	1172	1086
query71	400	283	276	276
query72	7076	5644	5633	5633
query73	746	328	324	324
query74	5957	5473	5609	5473
query75	3388	2688	2678	2678
query76	2765	987	896	896
query77	465	316	303	303
query78	9610	9067	8842	8842
query79	2191	517	516	516
query80	2139	465	481	465
query81	586	223	226	223
query82	805	144	144	144
query83	285	165	166	165
query84	263	95	86	86
query85	2206	325	303	303
query86	491	308	321	308
query87	3316	3087	3114	3087
query88	4085	2468	2454	2454
query89	463	373	377	373
query90	1876	195	195	195
query91	133	102	103	102
query92	65	50	50	50
query93	2458	493	498	493
query94	1359	220	212	212
query95	407	315	320	315
query96	593	275	280	275
query97	3137	3022	3051	3022
query98	219	204	190	190
query99	1535	1307	1237	1237
Total cold run time: 286332 ms
Total hot run time: 172109 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.03
query3	0.23	0.05	0.05
query4	1.67	0.09	0.09
query5	0.51	0.49	0.49
query6	1.14	0.72	0.72
query7	0.02	0.02	0.01
query8	0.05	0.05	0.05
query9	0.54	0.50	0.50
query10	0.55	0.55	0.54
query11	0.15	0.12	0.11
query12	0.15	0.12	0.12
query13	0.59	0.59	0.59
query14	0.75	0.78	0.81
query15	0.86	0.82	0.81
query16	0.36	0.36	0.36
query17	1.04	1.00	1.02
query18	0.24	0.22	0.21
query19	1.87	1.76	1.82
query20	0.01	0.02	0.01
query21	15.39	0.76	0.67
query22	4.31	7.01	2.16
query23	18.29	1.36	1.18
query24	2.04	0.26	0.22
query25	0.15	0.09	0.08
query26	0.29	0.21	0.22
query27	0.45	0.23	0.23
query28	13.31	1.02	0.99
query29	12.62	3.31	3.36
query30	0.26	0.06	0.05
query31	2.87	0.39	0.38
query32	3.27	0.47	0.48
query33	2.89	2.93	2.89
query34	17.02	4.30	4.34
query35	4.49	4.48	4.44
query36	0.65	0.48	0.45
query37	0.20	0.16	0.16
query38	0.16	0.14	0.15
query39	0.04	0.04	0.04
query40	0.15	0.12	0.12
query41	0.09	0.04	0.05
query42	0.06	0.05	0.04
query43	0.04	0.04	0.03
Total cold run time: 109.89 s
Total hot run time: 30.86 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 44b2e4f into apache:master Jul 14, 2024
31 of 35 checks passed
seawinde pushed a commit to seawinde/doris that referenced this pull request Jul 17, 2024
…ud (apache#36786)

Create dynamic partitions, optimize from calling prepare rpc and commit
rpc multiple times to only calling prepare and commit once

```
in one server(fe/ms)

before optimize:
Query OK, 0 rows affected (16.96 sec)
Query OK, 0 rows affected (16.65 sec)
Query OK, 0 rows affected (16.26 sec)
Query OK, 0 rows affected (16.39 sec)
Query OK, 0 rows affected (17.15 sec)

after optimize:
Query OK, 0 rows affected (13.31 sec)
Query OK, 0 rows affected (11.71 sec)
Query OK, 0 rows affected (11.81 sec)
Query OK, 0 rows affected (11.55 sec)
Query OK, 0 rows affected (12.07 sec)

CREATE TABLE income_statistics_service (
    statistics_date date ,
    lyy_distributor_id bigint ,
    lyy_equipment_group_id bigint ,
    lyy_equipment_id bigint ,
    service_type_id bigint ,
    equipment_value varchar(40),
    wechat_pay_amount decimal,
    wechat_refund_amount decimal,
    alipay_pay_amount decimal,
    alipay_refund_amount decimal,
    union_pay_amount decimal,
    union_refund_amount decimal,
    app_pay_amount decimal,
    app_refund_amount decimal,
    ad_amount decimal,
    ad_distributor_count bigint,
    offline_coins bigint,
    online_coins bigint,
    online_startup_count bigint,
    gift_consumption_amount decimal,
    gift_consumption_count bigint,
    wechat_pay_coins bigint,
    alipay_pay_coins bigint,
    online_red_coins bigint,
    game_online_amount decimal,
    game_gift_consumption_amount decimal,
    game_gift_consumption_count bigint,
    rd_gift_consumption_count bigint,
    rd_gift_consumption_amount decimal,
    online_amount decimal,
    offline_amount decimal,
    offline_count bigint,
    wechat_pay_count bigint,
    alipay_pay_count bigint,
    union_pay_count bigint,
    wechat_refund_count bigint,
    alipay_refund_count bigint,
    union_refund_count bigint,
    app_pay_count bigint,
    app_refund_count bigint,
    created datetime,
    updated datetime,
    service_type_value varchar(32),
    service_type_name varchar(32),
    jd_pay_amount decimal ,
    jd_refund_amount decimal ,
    jd_pay_count bigint ,
    jd_refund_count bigint ,
    lyy_factory_id bigint,
    purse_amount decimal ,
    purse_refund_amount decimal ,
    purse_count bigint ,
    purse_refund_count bigint ,
    boost_pay_amount decimal ,
    boost_refund_amount decimal ,
    boost_pay_count bigint ,
    boost_refund_count bigint ,
    grabpay_pay_amount decimal ,
    grabpay_refund_amount decimal ,
    grabpay_pay_count bigint ,
    grabpay_refund_count bigint ,
    maybank_pay_amount decimal ,
    maybank_refund_amount decimal ,
    maybank_pay_count bigint ,
    maybank_refund_count bigint ,
    pay_start_amount decimal ,
    exchange_amount decimal ,
    auto_refund_count bigint ,
    auto_refund_amount decimal ,
    manual_refund_count bigint ,
    manual_refund_amount decimal ,
    custom_service_fee decimal,
    value_added_service_fee decimal,
    INDEX idx_statistics_date (`statistics_date`) USING BITMAP COMMENT '',
    INDEX idx_lyy_distributor_id (`lyy_distributor_id`) USING BITMAP COMMENT '',
    INDEX idx_lyy_equipment_group_id (`lyy_equipment_group_id`) USING BITMAP COMMENT '',
    INDEX idx_lyy_equipment_id (`lyy_equipment_id`) USING BITMAP COMMENT '',
    INDEX idx_service_type_id (`service_type_id`) USING BITMAP COMMENT ''
  ) ENGINE = OLAP UNIQUE KEY(
    `statistics_date`,
    `lyy_distributor_id`,
    `lyy_equipment_group_id`,
    `lyy_equipment_id`,
    `service_type_id`
  ) COMMENT 'OLAP' PARTITION BY RANGE(`statistics_date`)()
DISTRIBUTED BY HASH(`lyy_distributor_id`) BUCKETS 6 PROPERTIES (
  "file_cache_ttl_seconds" = "0",
  "bloom_filter_columns" = "statistics_date, lyy_distributor_id, lyy_equipment_group_id, lyy_equipment_id, service_type_id",
  "dynamic_partition.enable" = "true",
  "dynamic_partition.time_unit" = "DAY",
  "dynamic_partition.time_zone" = "Asia/Shanghai",
  "dynamic_partition.start" = "-730",
  "dynamic_partition.end" = "3",
  "dynamic_partition.prefix" = "p",
  "dynamic_partition.buckets" = "2",
  "dynamic_partition.create_history_partition" = "true",
  "dynamic_partition.history_partition_num" = "-1",
  "dynamic_partition.hot_partition_num" = "0",
  "dynamic_partition.reserved_history_periods" = "NULL",
  "enable_unique_key_merge_on_write" = "true",
  "light_schema_change" = "true"
);

show partitions from income_statistics_service;
......
734 rows in set (1.06 sec)
```

---------

Co-authored-by: Gavin Chou <gavineaglechou@gmail.com>
dataroaring pushed a commit that referenced this pull request Jul 17, 2024
…ud (#36786)

Create dynamic partitions, optimize from calling prepare rpc and commit
rpc multiple times to only calling prepare and commit once

```
in one server(fe/ms)

before optimize:
Query OK, 0 rows affected (16.96 sec)
Query OK, 0 rows affected (16.65 sec)
Query OK, 0 rows affected (16.26 sec)
Query OK, 0 rows affected (16.39 sec)
Query OK, 0 rows affected (17.15 sec)

after optimize:
Query OK, 0 rows affected (13.31 sec)
Query OK, 0 rows affected (11.71 sec)
Query OK, 0 rows affected (11.81 sec)
Query OK, 0 rows affected (11.55 sec)
Query OK, 0 rows affected (12.07 sec)

CREATE TABLE income_statistics_service (
    statistics_date date ,
    lyy_distributor_id bigint ,
    lyy_equipment_group_id bigint ,
    lyy_equipment_id bigint ,
    service_type_id bigint ,
    equipment_value varchar(40),
    wechat_pay_amount decimal,
    wechat_refund_amount decimal,
    alipay_pay_amount decimal,
    alipay_refund_amount decimal,
    union_pay_amount decimal,
    union_refund_amount decimal,
    app_pay_amount decimal,
    app_refund_amount decimal,
    ad_amount decimal,
    ad_distributor_count bigint,
    offline_coins bigint,
    online_coins bigint,
    online_startup_count bigint,
    gift_consumption_amount decimal,
    gift_consumption_count bigint,
    wechat_pay_coins bigint,
    alipay_pay_coins bigint,
    online_red_coins bigint,
    game_online_amount decimal,
    game_gift_consumption_amount decimal,
    game_gift_consumption_count bigint,
    rd_gift_consumption_count bigint,
    rd_gift_consumption_amount decimal,
    online_amount decimal,
    offline_amount decimal,
    offline_count bigint,
    wechat_pay_count bigint,
    alipay_pay_count bigint,
    union_pay_count bigint,
    wechat_refund_count bigint,
    alipay_refund_count bigint,
    union_refund_count bigint,
    app_pay_count bigint,
    app_refund_count bigint,
    created datetime,
    updated datetime,
    service_type_value varchar(32),
    service_type_name varchar(32),
    jd_pay_amount decimal ,
    jd_refund_amount decimal ,
    jd_pay_count bigint ,
    jd_refund_count bigint ,
    lyy_factory_id bigint,
    purse_amount decimal ,
    purse_refund_amount decimal ,
    purse_count bigint ,
    purse_refund_count bigint ,
    boost_pay_amount decimal ,
    boost_refund_amount decimal ,
    boost_pay_count bigint ,
    boost_refund_count bigint ,
    grabpay_pay_amount decimal ,
    grabpay_refund_amount decimal ,
    grabpay_pay_count bigint ,
    grabpay_refund_count bigint ,
    maybank_pay_amount decimal ,
    maybank_refund_amount decimal ,
    maybank_pay_count bigint ,
    maybank_refund_count bigint ,
    pay_start_amount decimal ,
    exchange_amount decimal ,
    auto_refund_count bigint ,
    auto_refund_amount decimal ,
    manual_refund_count bigint ,
    manual_refund_amount decimal ,
    custom_service_fee decimal,
    value_added_service_fee decimal,
    INDEX idx_statistics_date (`statistics_date`) USING BITMAP COMMENT '',
    INDEX idx_lyy_distributor_id (`lyy_distributor_id`) USING BITMAP COMMENT '',
    INDEX idx_lyy_equipment_group_id (`lyy_equipment_group_id`) USING BITMAP COMMENT '',
    INDEX idx_lyy_equipment_id (`lyy_equipment_id`) USING BITMAP COMMENT '',
    INDEX idx_service_type_id (`service_type_id`) USING BITMAP COMMENT ''
  ) ENGINE = OLAP UNIQUE KEY(
    `statistics_date`,
    `lyy_distributor_id`,
    `lyy_equipment_group_id`,
    `lyy_equipment_id`,
    `service_type_id`
  ) COMMENT 'OLAP' PARTITION BY RANGE(`statistics_date`)()
DISTRIBUTED BY HASH(`lyy_distributor_id`) BUCKETS 6 PROPERTIES (
  "file_cache_ttl_seconds" = "0",
  "bloom_filter_columns" = "statistics_date, lyy_distributor_id, lyy_equipment_group_id, lyy_equipment_id, service_type_id",
  "dynamic_partition.enable" = "true",
  "dynamic_partition.time_unit" = "DAY",
  "dynamic_partition.time_zone" = "Asia/Shanghai",
  "dynamic_partition.start" = "-730",
  "dynamic_partition.end" = "3",
  "dynamic_partition.prefix" = "p",
  "dynamic_partition.buckets" = "2",
  "dynamic_partition.create_history_partition" = "true",
  "dynamic_partition.history_partition_num" = "-1",
  "dynamic_partition.hot_partition_num" = "0",
  "dynamic_partition.reserved_history_periods" = "NULL",
  "enable_unique_key_merge_on_write" = "true",
  "light_schema_change" = "true"
);

show partitions from income_statistics_service;
......
734 rows in set (1.06 sec)
```

---------

Co-authored-by: Gavin Chou <gavineaglechou@gmail.com>
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.1-merged meta-change reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants