Skip to content

Commit 80be495

Browse files
authored
sql-faq: add missing DELAYED priority (#12237) (#12789)
1 parent 567d582 commit 80be495

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

faq/sql-faq.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,23 @@ TiDB supports changing the priority on a [global](/system-variables.md#tidb_forc
205205

206206
- `LOW_PRIORITY`: this statement has a low priority, that is, TiDB reduces the priority of this statement during the execution period.
207207

208+
- `DELAYED`: this statement has normal priority and is the same as the `NO_PRIORITY` setting for `tidb_force_priority`.
209+
208210
You can combine the above two parameters with the DML of TiDB to use them. For example:
209211

210212
1. Adjust the priority by writing SQL statements in the database:
211213

212214
{{< copyable "sql" >}}
213215

214216
```sql
215-
select HIGH_PRIORITY | LOW_PRIORITY count(*) from table_name;
216-
insert HIGH_PRIORITY | LOW_PRIORITY into table_name insert_values;
217-
delete HIGH_PRIORITY | LOW_PRIORITY from table_name;
218-
update HIGH_PRIORITY | LOW_PRIORITY table_reference set assignment_list where where_condition;
219-
replace HIGH_PRIORITY | LOW_PRIORITY into table_name;
217+
SELECT HIGH_PRIORITY | LOW_PRIORITY | DELAYED COUNT(*) FROM table_name;
218+
INSERT HIGH_PRIORITY | LOW_PRIORITY | DELAYED INTO table_name insert_values;
219+
DELETE HIGH_PRIORITY | LOW_PRIORITY | DELAYED FROM table_name;
220+
UPDATE HIGH_PRIORITY | LOW_PRIORITY | DELAYED table_reference SET assignment_list WHERE where_condition;
221+
REPLACE HIGH_PRIORITY | LOW_PRIORITY | DELAYED INTO table_name;
220222
```
221223

222-
2. The full table scan statement automatically adjusts itself to a low priority. `analyze` has a low priority by default.
224+
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.
223225

224226
## What's the trigger strategy for `auto analyze` in TiDB?
225227

0 commit comments

Comments
 (0)