DarvenDuan opened a new pull request, #22246: URL: https://github.com/apache/doris/pull/22246
## Proposed changes Issue Number: close #xxx Before this improvement, Doris generate only one scan_key_range when the number of elements in the IN clause exceeds doris_max_scan_key_num and the column in the IN clause hits prefix index. It's NOT reasonable because data can't be filtered well by prefix index and single scan_key_range limits the scan concurrency. After this improvement, we generate doris_max_scan_key_num scan_key_ranges according to the values in the IN clause. Example: - `select * from tbl where id in (1, 3, 14, 58, 60);`, `id` is prefix index. - doris_max_scan_key_num = 3 before : we get single scan_key_range: [1, 60] now: we get three scan_key_range: [1, 3], [14, 14], [58, 60] In my test case, it can speed up query very obviously : - elements in the IN clause: 100 - doris_max_scan_key_num = 48 before: query cost time: **7s891ms** only one scanKey   after: query cost time : **122ms** 48 scanKeys   ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org