CONCURRENTLY
CONCURRENTLY is an SQL keyword used to maintain highly concurrent, read-heavy workloads. It allows operations to proceed without locking an entire table, making sure the task is performed in parallel with other actions. Particularly used in commands like CREATE INDEX CONCURRENTLY, it helps avoid disrupting normal operation of a database system.
Example
Output
Explanation
The CREATE INDEX CONCURRENTLY
statement is used to create an index without locking the table. The locking of the table would otherwise prevent any modifications on the table. The example provided creates an index on column_name
in table_name
. The execution time may vary depending on the size of the table. This command does not output any data.