Middle
Mis on koostatud indeks (indeks mitmel veerul)?
sobes.tech AI
Vastus AI-lt
A composite index is a database index created on multiple columns of a table simultaneously. This index speeds up queries that filter or sort data based on the combination of these columns.
For example, if you have a table with fields first_name and last_name, a composite index on (last_name, first_name) will help quickly find records where both fields are considered at the same time.
It is important to remember that the order of columns in a composite index matters: an index on (last_name, first_name) is effectively used for queries filtering by last_name or both fields, but not only by first_name.