HIGH_PRIORITY

HIGH_PRIORITY is a modifier in SQL that influences the scheduling priority of the statements. It can be incorporated with certain SQL commands such as SELECT and DELETE. This command instructs MySQL to delay execution of the current statement until there are no other connections that are reading from the table, giving higher priority to the statement. It is used to give particular queries priority over others.

Example

INSERT HIGH_PRIORITY INTO Customers (CustomerName, ContactName, Address, PostalCode, City)
VALUES ('Cardinal', 'Tom', '678 Bris Ave', '40032', 'Brooklyn');

Output

Query OK, 1 row affected

Explanation

The HIGH_PRIORITY keyword in MySQL increases the priority of an INSERT task. This example code executes a HIGH_PRIORITY INSERT that puts a new row of data into the ‘Customers’ table.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.