csun5285 commented on code in PR #67915:
URL: https://github.com/apache/doris/pull/67915#discussion_r4004052894


##########
be/src/exec/operator/olap_scan_operator.cpp:
##########
@@ -764,15 +790,7 @@ Status 
OlapScanLocalState::_init_scanners(std::list<ScannerSPtr>* scanners) {
                 std::max<int64_t>(1024, 
state()->parallel_scan_min_rows_per_scanner());
         scanner_builder.set_max_scanners_count(max_scanners_count);
         scanner_builder.set_min_rows_per_scanner(min_rows_per_scanner);
-        // If the session variable is set, force one scanner per segment.
-        if (state()->query_options().__isset.optimize_index_scan_parallelism &&
-            state()->query_options().optimize_index_scan_parallelism) {
-            // TODO: Use optimize_index_scan_parallelism for ann range search 
in the future.
-            // Currently, ann topn is enough
-            if (_ann_topn_runtime != nullptr) {
-                scanner_builder.set_scan_parallelism_by_per_segment(true);
-            }
-        }
+        
scanner_builder.set_scan_parallelism_by_per_segment(_use_scan_parallelism_by_per_segment());

Review Comment:
   scanner 变多的代价很低



-- 
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]

Reply via email to