-
Notifications
You must be signed in to change notification settings - Fork 701
sql-faq: add missing DELAYED priority #12237
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
Conversation
``` sql> SELECT HIGH_PRIORITY 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.0014 sec) sql> SELECT LOW_PRIORITY 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.0004 sec) sql> SELECT DELAYED 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.0004 sec) ```
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
faq/sql-faq.md
Outdated
INSERT HIGH_PRIORITY | LOW_PRIORITY | DELAYED INTO table_name insert_values; | ||
DELETE HIGH_PRIORITY | LOW_PRIORITY | DELAYED FROM table_name; | ||
UPDATE HIGH_PRIORITY | LOW_PRIORITY | DELAYED table_reference SET assignment_list WHERE where_condition; | ||
REPLACE HIGH_PRIORITY | LOW_PRIORITY | DELAYED INTO table_name; | ||
``` | ||
|
||
2. The full table scan statement automatically adjusts itself to a low priority. `analyze` has a low priority by default. |
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 this still true for full table scans?
For ANALYZE
it seems to be: https://github.com/pingcap/tidb/blob/1e0956d5ba41182e603295e02ae8f767d62979e4/distsql/request_builder.go#L173
2. The full table scan statement automatically adjusts itself to a low priority. `analyze` has a low priority by default. | |
2. The full table scan statement automatically adjusts itself to a low priority. [`ANALYZE`](/sql-statements/sql-statement-analyze-table.md) has a low priority by default. |
The Priority seems to be used for DistSQL TiKV operations. These seem to show up in Grafana like this: Maybe we should link to https://docs.pingcap.com/tidb/stable/grafana-tikv-dashboard#scheduler here? |
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: a95a8c8
|
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
* sql-faq: add missing DELAYED priority ``` sql> SELECT HIGH_PRIORITY 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.0014 sec) sql> SELECT LOW_PRIORITY 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.0004 sec) sql> SELECT DELAYED 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.0004 sec) ``` * Update faq/sql-faq.md * Update faq/sql-faq.md --------- Co-authored-by: Daniël van Eeden <git@myname.nl> Co-authored-by: Daniël van Eeden <github@myname.nl> Co-authored-by: shichun-0415 <89768198+shichun-0415@users.noreply.github.com>
What is changed, added or deleted? (Required)
Add the missing
DELAYED
prioritysee also: https://github.com/pingcap/tidb/blob/1e0956d5ba41182e603295e02ae8f767d62979e4/distsql/request_builder.go#L257-L267
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?