SQL Basics | DDL: Data Definition Language | INDEX

An index helps retrieve data from a table quickly and efficiently. However, while retrieval becomes faster, operations such as INSERT and UPDATE can become slower, so care is required. It is recommended to create indexes on tables that are queried frequently.

CREATE INDEX

CREATE INDEX index_name
ON table_name (column1, column2, ...);

DROP INDEX

DROP INDEX [ IF EXISTS ] index_name;