Junior — Middle
Millist tüüpi koostise indeksit kasutatakse mitme välja jaoks andmebaasis?
sobes.tech AI
Vastus AI-lt
For indexing multiple fields in a database, a composite (or concatenated) index is used. It is created based on several columns of the table and allows speeding up queries that filter or sort data on these fields simultaneously.
For example, in SQL:
CREATE INDEX idx_name ON table_name (column1, column2);
Such an index is effective for queries with conditions on column1 and column2 together, but is not always useful for queries only on column2.