Skip to content

Conversation

@924060929
Copy link
Contributor

cherry pick from #54422

…t planner performance (apache#54422)

support explain command return empty string to test planner performance
```sql
MySQL root@127.0.0.1:test> set enable_explain_none=true;
Query OK, 0 rows affected
Time: 0.010s
MySQL root@127.0.0.1:test> explain insert into t1 values(1, 'a'), (2, 'b');
+---------------------------------+
| Explain String(Nereids Planner) |
+---------------------------------+
|                                 |
+---------------------------------+
```

(cherry picked from commit f1e4e66)
@924060929 924060929 requested a review from dataroaring as a code owner August 20, 2025 03:28
@Thearas
Copy link
Contributor

Thearas commented Aug 20, 2025

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17756	6721	6720	6720
q2	2053	202	173	173
q3	10568	1119	1180	1119
q4	10338	768	762	762
q5	7833	2814	2785	2785
q6	207	130	133	130
q7	964	625	616	616
q8	9427	1978	2032	1978
q9	8256	6383	6455	6383
q10	7042	2280	2314	2280
q11	454	266	263	263
q12	424	213	218	213
q13	17815	3020	2972	2972
q14	228	207	222	207
q15	509	455	466	455
q16	477	379	376	376
q17	977	613	609	609
q18	7224	6614	6650	6614
q19	1386	1076	1095	1076
q20	471	208	206	206
q21	3932	3260	3184	3184
q22	1133	990	1004	990
Total cold run time: 109474 ms
Total hot run time: 40111 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6618	6565	6560	6560
q2	332	233	246	233
q3	3022	2942	2895	2895
q4	2108	1879	1818	1818
q5	5755	5750	5727	5727
q6	202	128	123	123
q7	2269	1849	1811	1811
q8	3380	3523	3438	3438
q9	8901	8905	8919	8905
q10	3606	3553	3506	3506
q11	595	509	503	503
q12	814	632	647	632
q13	5330	3138	3216	3138
q14	299	260	268	260
q15	518	460	470	460
q16	485	444	440	440
q17	1876	1638	1607	1607
q18	8332	7717	7875	7717
q19	1655	1570	1493	1493
q20	2104	1901	1883	1883
q21	5289	4967	5037	4967
q22	1141	1076	1021	1021
Total cold run time: 64631 ms
Total hot run time: 59137 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192899 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 2556e301d01e65d47bab756d8062c0dd343ceb2e, data reload: false

query1	955	405	400	400
query2	6272	1962	1898	1898
query3	8690	216	203	203
query4	33894	23547	23558	23547
query5	3707	470	441	441
query6	267	177	180	177
query7	4197	317	321	317
query8	303	224	230	224
query9	9442	2602	2605	2602
query10	488	280	259	259
query11	17863	15305	15610	15305
query12	162	102	102	102
query13	1563	430	436	430
query14	9664	6659	6989	6659
query15	240	169	176	169
query16	7921	499	479	479
query17	1622	609	599	599
query18	2213	348	338	338
query19	263	174	167	167
query20	117	112	121	112
query21	210	117	113	113
query22	4749	4540	4440	4440
query23	35334	34525	34403	34403
query24	11842	2834	2900	2834
query25	689	450	442	442
query26	1777	190	174	174
query27	2973	362	366	362
query28	7627	2210	2190	2190
query29	1078	448	481	448
query30	280	176	175	175
query31	1020	823	855	823
query32	96	58	57	57
query33	768	297	316	297
query34	1082	518	532	518
query35	851	742	729	729
query36	1071	950	950	950
query37	267	65	69	65
query38	4052	3967	4067	3967
query39	1527	1452	1663	1452
query40	249	103	111	103
query41	49	51	48	48
query42	118	103	105	103
query43	537	484	474	474
query44	1436	823	827	823
query45	188	180	175	175
query46	1167	744	738	738
query47	1979	1891	1924	1891
query48	467	383	392	383
query49	1095	391	409	391
query50	840	424	430	424
query51	7686	7375	7266	7266
query52	101	98	91	91
query53	271	188	182	182
query54	1219	473	477	473
query55	82	79	85	79
query56	274	254	238	238
query57	1320	1219	1209	1209
query58	224	206	214	206
query59	3135	3026	2913	2913
query60	303	257	259	257
query61	123	107	106	106
query62	838	683	697	683
query63	232	195	189	189
query64	5000	699	644	644
query65	3353	3308	3192	3192
query66	1091	293	298	293
query67	16060	15746	15703	15703
query68	5213	565	579	565
query69	434	261	261	261
query70	1194	1128	1116	1116
query71	311	260	256	256
query72	6162	4138	4199	4138
query73	737	352	343	343
query74	10150	9159	9182	9159
query75	3362	2624	2654	2624
query76	3185	1076	1048	1048
query77	426	270	272	270
query78	10561	9591	9541	9541
query79	2480	598	615	598
query80	1063	423	433	423
query81	541	229	216	216
query82	621	89	87	87
query83	231	141	146	141
query84	234	81	76	76
query85	1309	311	306	306
query86	428	288	309	288
query87	4411	4241	4224	4224
query88	4242	2374	2373	2373
query89	405	289	297	289
query90	1988	182	185	182
query91	185	152	150	150
query92	72	51	51	51
query93	2480	555	554	554
query94	746	299	299	299
query95	368	256	256	256
query96	609	279	283	279
query97	3340	3170	3164	3164
query98	221	203	195	195
query99	1495	1283	1314	1283
Total cold run time: 305777 ms
Total hot run time: 192899 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.06
query4	1.63	0.10	0.11
query5	0.52	0.51	0.52
query6	1.15	0.73	0.73
query7	0.02	0.02	0.02
query8	0.05	0.04	0.03
query9	0.56	0.50	0.50
query10	0.56	0.57	0.56
query11	0.14	0.11	0.10
query12	0.14	0.11	0.11
query13	0.60	0.59	0.60
query14	0.77	0.81	0.78
query15	0.84	0.83	0.83
query16	0.40	0.40	0.38
query17	1.06	1.08	1.04
query18	0.24	0.23	0.23
query19	1.96	1.86	1.89
query20	0.01	0.01	0.02
query21	15.38	0.60	0.56
query22	2.45	1.75	1.59
query23	17.15	0.93	0.90
query24	2.99	1.83	1.80
query25	0.34	0.05	0.06
query26	0.52	0.14	0.14
query27	0.05	0.04	0.04
query28	9.16	0.54	0.47
query29	12.57	3.28	3.24
query30	0.25	0.06	0.06
query31	2.86	0.40	0.38
query32	3.25	0.46	0.45
query33	3.02	3.00	3.07
query34	16.91	4.51	4.52
query35	4.63	4.60	4.56
query36	0.66	0.48	0.48
query37	0.09	0.07	0.06
query38	0.05	0.03	0.03
query39	0.03	0.02	0.03
query40	0.16	0.12	0.13
query41	0.08	0.02	0.02
query42	0.03	0.03	0.02
query43	0.04	0.03	0.02
Total cold run time: 103.65 s
Total hot run time: 31.02 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 66.67% (4/6) 🎉
Increment coverage report
Complete coverage report

@924060929
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 57.14% (4/7) 🎉
Increment coverage report
Complete coverage report

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 0b04cc9 into apache:branch-3.0 Sep 4, 2025
22 of 25 checks passed
@924060929 924060929 deleted the branch-3.0-explain-none branch September 4, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants