Skip to content

Conversation

@morningman
Copy link
Contributor

bp #56093

sql like `select count(*) from tbl`, we should choose column with
smallest size to read, for performance.
This logic exists in old planner, but missing in Nereids
@Thearas
Copy link
Contributor

Thearas commented Sep 25, 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?

@morningman
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17608	5603	5452	5452
q2	2022	388	272	272
q3	11711	1257	737	737
q4	10273	854	453	453
q5	8842	2369	2121	2121
q6	180	166	129	129
q7	877	732	616	616
q8	9336	1428	1215	1215
q9	5303	4929	4840	4840
q10	6748	2257	1805	1805
q11	460	275	265	265
q12	330	349	205	205
q13	17793	3574	3003	3003
q14	222	219	211	211
q15	531	480	473	473
q16	432	426	374	374
q17	601	856	349	349
q18	6798	6296	6275	6275
q19	2054	953	554	554
q20	322	325	197	197
q21	2786	2168	2047	2047
q22	1101	1068	1010	1010
Total cold run time: 106330 ms
Total hot run time: 32603 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5550	5581	5550	5550
q2	234	330	242	242
q3	2383	2743	2365	2365
q4	1393	1832	1413	1413
q5	4513	5050	5020	5020
q6	172	165	130	130
q7	2103	2022	1865	1865
q8	2708	2869	2730	2730
q9	7307	7351	7272	7272
q10	3035	3321	2758	2758
q11	564	509	500	500
q12	674	816	636	636
q13	3401	3820	3148	3148
q14	290	314	264	264
q15	500	469	471	469
q16	441	475	430	430
q17	1195	1725	1254	1254
q18	7461	7509	7319	7319
q19	803	1174	1045	1045
q20	2004	2049	1888	1888
q21	5401	4859	4752	4752
q22	1097	1061	1010	1010
Total cold run time: 53229 ms
Total hot run time: 52060 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192145 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 6c01c93242d5f4dcbf20c3ef8980025ed70a338a, data reload: false

query1	960	401	451	401
query2	6121	1891	1886	1886
query3	8688	198	196	196
query4	33279	23980	23393	23393
query5	3632	594	462	462
query6	284	200	183	183
query7	4205	489	318	318
query8	315	253	248	248
query9	9447	2650	2641	2641
query10	456	330	259	259
query11	18207	15414	15123	15123
query12	162	105	106	105
query13	1534	549	402	402
query14	9975	6674	6613	6613
query15	245	191	182	182
query16	8052	640	502	502
query17	1536	772	588	588
query18	2116	445	312	312
query19	185	175	156	156
query20	126	127	133	127
query21	212	125	107	107
query22	4662	4742	4586	4586
query23	35000	34377	34143	34143
query24	7272	2652	2668	2652
query25	534	472	427	427
query26	793	285	168	168
query27	2129	460	357	357
query28	5551	2251	2236	2236
query29	697	585	449	449
query30	234	196	159	159
query31	1033	918	829	829
query32	86	62	63	62
query33	511	377	328	328
query34	784	875	527	527
query35	798	818	736	736
query36	1020	1040	978	978
query37	115	96	74	74
query38	3997	3945	3971	3945
query39	1510	1531	1446	1446
query40	214	126	126	126
query41	52	53	49	49
query42	118	108	107	107
query43	507	516	500	500
query44	1357	849	830	830
query45	192	183	173	173
query46	907	1080	675	675
query47	1956	1991	1888	1888
query48	427	454	353	353
query49	748	537	422	422
query50	680	698	428	428
query51	7369	7448	7181	7181
query52	127	104	95	95
query53	248	277	200	200
query54	583	551	482	482
query55	85	82	80	80
query56	287	289	269	269
query57	1275	1275	1247	1247
query58	254	242	229	229
query59	3110	3238	3117	3117
query60	307	289	262	262
query61	120	115	115	115
query62	792	773	710	710
query63	242	203	199	199
query64	4698	1008	646	646
query65	3399	3314	3271	3271
query66	1054	425	313	313
query67	16516	15795	15793	15793
query68	8009	820	538	538
query69	493	303	267	267
query70	1216	1097	1024	1024
query71	415	290	276	276
query72	5127	3733	3972	3733
query73	644	736	358	358
query74	10342	9152	9158	9152
query75	3739	3145	2671	2671
query76	3533	1125	754	754
query77	768	397	280	280
query78	10316	10549	9581	9581
query79	5166	883	579	579
query80	609	521	437	437
query81	481	267	220	220
query82	226	120	86	86
query83	174	159	143	143
query84	290	105	78	78
query85	742	357	293	293
query86	353	290	306	290
query87	4322	4397	4168	4168
query88	4472	2415	2403	2403
query89	432	338	298	298
query90	2072	193	192	192
query91	133	145	109	109
query92	63	56	51	51
query93	3673	887	540	540
query94	649	377	309	309
query95	341	280	270	270
query96	487	602	278	278
query97	3150	3286	3164	3164
query98	233	211	199	199
query99	1417	1375	1338	1338
Total cold run time: 298174 ms
Total hot run time: 192145 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.06	0.03	0.03
query3	0.24	0.07	0.06
query4	1.63	0.11	0.10
query5	0.53	0.49	0.49
query6	1.13	0.73	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.03
query9	0.61	0.51	0.51
query10	0.57	0.56	0.55
query11	0.14	0.10	0.10
query12	0.14	0.11	0.11
query13	0.62	0.60	0.60
query14	0.76	0.78	0.80
query15	0.86	0.84	0.82
query16	0.39	0.38	0.38
query17	0.99	1.05	1.05
query18	0.25	0.21	0.23
query19	1.88	1.80	1.80
query20	0.01	0.01	0.01
query21	15.40	0.93	0.58
query22	0.74	0.94	0.70
query23	14.96	1.42	0.52
query24	3.70	1.82	1.30
query25	0.16	0.21	0.05
query26	0.36	0.15	0.13
query27	0.08	0.06	0.03
query28	14.06	0.92	0.43
query29	12.58	3.93	3.29
query30	0.26	0.10	0.06
query31	2.82	0.59	0.38
query32	3.24	0.54	0.46
query33	2.99	3.07	3.02
query34	16.47	5.16	4.54
query35	4.49	4.50	4.54
query36	0.65	0.50	0.48
query37	0.08	0.06	0.06
query38	0.04	0.04	0.04
query39	0.04	0.03	0.02
query40	0.17	0.13	0.12
query41	0.08	0.03	0.03
query42	0.03	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 104.35 s
Total hot run time: 29.18 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 95.24% (20/21) 🎉
Increment coverage report
Complete coverage report

@morningman morningman merged commit 562f07a into apache:branch-3.1 Sep 28, 2025
22 checks passed
@morrySnow morrySnow mentioned this pull request Oct 23, 2025
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