You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: faq/sql-faq.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -205,21 +205,23 @@ TiDB supports changing the priority on a [global](/system-variables.md#tidb_forc
205
205
206
206
- `LOW_PRIORITY`: this statement has a low priority, that is, TiDB reduces the priority of this statement during the execution period.
207
207
208
+
- `DELAYED`: this statement has normal priority and is the same as the `NO_PRIORITY` setting for`tidb_force_priority`.
209
+
208
210
You can combine the above two parameters with the DML of TiDB to use them. For example:
209
211
210
212
1. Adjust the priority by writing SQL statements in the database:
211
213
212
214
{{< copyable "sql">}}
213
215
214
216
```sql
215
-
selectHIGH_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;
220
222
```
221
223
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.
223
225
224
226
## What's the trigger strategy for `auto analyze` in TiDB?
0 commit comments