BiteTheDDDDt opened a new pull request, #39780: URL: https://github.com/apache/doris/pull/39780
## Proposed changes 1. heap和topn filter应该是绑定关系, 有topn filter时直接走heap 2. 把topn filter阈值设置为heap+topn比topn/full慢的边界 3. 按limit分为小->中->大, 有topn filter时选用算法应该是 heap+topn filter[0,10000000) -> full[10000000,20000000) -> topn[20000000,) 否则选用算法应该是 heap[0,5000000) -> full[5000000,20000000) -> topn -> topn[20000000,) select * from lineorder order by lo_orderpriority limit 100000; heap:3.33s full:18.3s select * from lineorder order by lo_orderpriority limit 1000000; heap:5.3s np:8s full:39s topn:30s select * from lineorder order by lo_orderpriority limit 5000000; heap:17.57 sec np:21.02 sec full:41.85 sec topn:32.20 sec select * from lineorder order by lo_orderpriority limit 10000000; heap:35s np: 39s full:47s topn:40s select * from lineorder order by lo_orderpriority limit 20000000; heap:1 min 9.16 sec full:48.09 sec topn: 44.97 sec -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
