Composite indexes in MySQL combine two or more columns into one index. This helps speed up queries that filter on those columns together. The index is sorted first by the first column, then by the second. When you query filtering on both columns, MySQL can quickly find matching rows using the index. If you query filtering only on the first column, the index can still help by using the prefix. But if you filter only on the second column, the index is not used efficiently because it is ordered by the first column first. This means MySQL may do a full table scan or use another index. Creating composite indexes is useful when your queries often filter on multiple columns together.