Middle
How to create a composite index in a database?
sobes.tech AI
Answer from AI
CREATE INDEX index_name ON table_name (column1, column2, ...);
Creates an index on multiple columns of a table. The order of columns is important because the index is used for queries that include the index columns as a prefix. For example, an index (a, b) can be used for queries on a or a, b, but not for queries only on b.