-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make index serial scan concurrency configurable and fix golint errors. #2928
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set the default value in NewSessionVars
.
sessionctx/variable/tidb_vars.go
Outdated
@@ -70,6 +70,10 @@ const ( | |||
// Set this value higher may reduce the latency but consumes more system resource. | |||
TiDBIndexLookupConcurrency = "tidb_index_lookup_concurrency" | |||
|
|||
// tidb_index_serial_scan_concurrency is user for controling the concurrency of index scan operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is used
Hi, do we have any bench results ? |
LGTM |
@ngaut In one of SMJ case, I increase the concurrency from 1 to 3 and query time drop from 2min to 1min 30sec. But this will cost more memory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cool |
When doing index double read operation with keepOrder as true, we use only one worker. If we need to read a lot of data, it will be quite slow. So I make it configurable. For OLAP TiDB cluster, we could set the concurrency to 4 or 5.
I will add test in the next commit.