You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/28 10:06:15 UTC

[GitHub] [doris] yangzhg opened a new pull request, #11301: [enhancement] Improve limit query performance on olapScannode

yangzhg opened a new pull request, #11301:
URL: https://github.com/apache/doris/pull/11301

   # Proposed changes
   
   Optimize the query logic with limit, for the case where the limit value is relatively small, reduce the parallelism of the scanner, reduce unnecessary resource consumption, and increase the number of similar queries that the system can carry at the same time, and increase the query speed by more than 60%
   
   before:
   ![image](https://user-images.githubusercontent.com/9098473/181478248-136563ac-ea27-4ccd-932b-364a6e9b99ae.png)
   
   after:
   
   ![image](https://user-images.githubusercontent.com/9098473/181479748-76bdc373-d01b-41fb-953b-9b37d296a92f.png)
   
   
   ## Checklist(Required)
   
   1. Type of your changes:
       - [x] Improvement
       - [ ] Fix
       - [ ] Feature-WIP
       - [ ] Feature
       - [ ] Doc
       - [ ] Refator
       - [ ] Others: 
   2. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   3. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   4. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   5. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   6. Are there any changes that cannot be rolled back:
       - [ ] Yes
       - [x] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yangzhg commented on a diff in pull request #11301: [enhancement] Improve limit query performance on olapScannode

Posted by GitBox <gi...@apache.org>.
yangzhg commented on code in PR #11301:
URL: https://github.com/apache/doris/pull/11301#discussion_r932793498


##########
be/src/exec/olap_scan_node.cpp:
##########
@@ -95,7 +95,8 @@ Status OlapScanNode::init(const TPlanNode& tnode, RuntimeState* state) {
 
         _runtime_filter_ctxs[i].runtimefilter = runtime_filter;
     }
-
+    _batch_size = _limit == -1 ? state->batch_size()

Review Comment:
   on vec-exec has the same stmt already



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei commented on a diff in pull request #11301: [enhancement] Improve limit query performance on olapScannode

Posted by GitBox <gi...@apache.org>.
yiguolei commented on code in PR #11301:
URL: https://github.com/apache/doris/pull/11301#discussion_r932783028


##########
be/src/exec/olap_scan_node.cpp:
##########
@@ -95,7 +95,8 @@ Status OlapScanNode::init(const TPlanNode& tnode, RuntimeState* state) {
 
         _runtime_filter_ctxs[i].runtimefilter = runtime_filter;
     }
-
+    _batch_size = _limit == -1 ? state->batch_size()

Review Comment:
   Is this only effective on non-vectorized engine?



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #11301: [bug](scanner) Improve limit query performance on olapScannode and avoid infinite loop

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #11301:
URL: https://github.com/apache/doris/pull/11301#issuecomment-1200738887

   PR approved by anyone and no changes requested.


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #11301: [bug](scanner) Improve limit query performance on olapScannode and avoid infinite loop

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #11301:
URL: https://github.com/apache/doris/pull/11301#issuecomment-1200738856

   PR approved by at least one committer and no changes requested.


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yangzhg merged pull request #11301: [bug](scanner) Improve limit query performance on olapScannode and avoid infinite loop

Posted by GitBox <gi...@apache.org>.
yangzhg merged PR #11301:
URL: https://github.com/apache/doris/pull/11301


-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org