Skip to content

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

Merged
merged 3 commits into from
Mar 7, 2023
Merged

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Jan 27, 2023

What is changed, added or deleted? (Required)

Add the 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)

see also: https://github.com/pingcap/tidb/blob/1e0956d5ba41182e603295e02ae8f767d62979e4/distsql/request_builder.go#L257-L267

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v6.6 (TiDB 6.6 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.4 (TiDB 6.4 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

```
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)
```
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 27, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • shichun-0415
  • tiancaiamao

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 27, 2023
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.
Copy link
Contributor Author

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

Suggested change
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.

@dveeden
Copy link
Contributor Author

dveeden commented Jan 27, 2023

The Priority seems to be used for DistSQL TiKV operations.

These seem to show up in Grafana like this:
image

Maybe we should link to https://docs.pingcap.com/tidb/stable/grafana-tikv-dashboard#scheduler here?

@TomShawn TomShawn requested a review from tiancaiamao January 28, 2023 02:23
@TomShawn TomShawn self-assigned this Jan 28, 2023
@TomShawn TomShawn added type/enhancement The issue or PR belongs to an enhancement. area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. translation/doing This PR's assignee is translating this PR. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.4 needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. and removed missing-translation-status This PR does not have translation status info. labels Jan 28, 2023
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 30, 2023
Copy link
Contributor

@shichun-0415 shichun-0415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 7, 2023
@shichun-0415
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: a95a8c8

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 7, 2023
@ti-chi-bot ti-chi-bot merged commit bf856f6 into pingcap:master Mar 7, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #12789.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.4: #12790.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #12791.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.6: #12792.

shichun-0415 added a commit that referenced this pull request Mar 7, 2023
* 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>
@lilin90 lilin90 assigned Oreoxmt and unassigned TomShawn Mar 24, 2023
@Oreoxmt Oreoxmt added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR's assignee is translating this PR. labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants