Covering indexes hold the entire primary data required to answer the whole query, inside the index itself. In other words, they “cover” the whole query. From the search, to the data retrieval.
They drastically improve perf by embedding the data required to answer the query inside the index itself, skipping the primary data storage lookup like PK index in InnoDB or PG heap.
A 3D stack with an index on email on top and the users table below. Pick which columns the index stores and which columns the query asks for, and the stack shows whether the table has to be read.
| id | name | country |
|---|
Drag the stack in any direction to turn it.