CONCURRENTLY (CREATE INDEX)
CONCURRENTLY (CREATE INDEX) is a SQL statement in the Indexes category. Creates an index without locking the table for writes. PostgreSQL-only. The syntax is CREATE INDEX CONCURRENTLY index_name ON table (col);. It returns index created without lock. A typical example: CREATE INDEX CONCURRENTLY idx_employees_name ON employees (last_name); -- Table remains available for reads and writes during index creation -- Takes longer but avoids downtime A close relative is CREATE INDEX, which creates an index on one or more columns to speed up query performance. A close relative is DROP INDEX, which removes an existing index from a table. A close relative is COMPOSITE INDEX, which an index on multiple columns. Column order matters — queries use leftmost prefix. More about this category: Database indexes — CREATE INDEX, UNIQUE INDEX, COMPOSITE INDEX, DROP INDEX. Related Indexes entries: CREATE INDEX, DROP INDEX, COMPOSITE INDEX, EXPLAIN, FULLTEXT INDEX, SPATIAL INDEX, INCLUDE INDEX (Covering Index), PARTIAL INDEX.