Learn the vocabulary of an index that answers a query directly without touching the table row.
0 / 5 completed
1 / 5
At standup, a dev mentions building an index that includes every column a query actually needs, so the database can answer that query directly from the index without touching the underlying table row. What is this kind of index called?
A covering index includes every column a query actually needs, so the database can answer that query directly from the index without ever touching the underlying table row. A minimal index containing only the filter column still requires a separate lookup into the table for every other column the query selects. This complete coverage is what lets a covering index eliminate an otherwise necessary extra row fetch entirely.
2 / 5
During a design review, the team wants to add a non-filtered, non-sorted column to the index purely so it can be read directly from the index, without making that column part of the index's actual sort key. Which capability supports this?
INCLUDE columns add data to a covering index purely so it can be read directly from the index, without making that column part of the index's actual sort key or search structure. Adding every additional column directly into the sort key would bloat and complicate the index's ordering unnecessarily. This INCLUDE mechanism is what lets an index cover a query's needed columns efficiently without disturbing its core, indexed ordering.
3 / 5
In a code review, a dev notices avoiding a 'bookmark lookup', where the database has to jump back to the actual table row to fetch a column not present in the index, by widening the index to include that missing column. What does this represent?
Eliminating a bookmark lookup by widening the index to cover every needed column avoids the extra jump back to the actual table row that would otherwise be required to fetch a missing column. Always performing that lookup regardless wastes an avoidable, extra round trip for every single query execution. This widening is exactly what defines the difference between a regular index and a genuinely covering one.
4 / 5
An incident report shows a frequently run query was still hitting the base table for one extra column not included in the existing index, causing a large number of unnecessary row lookups despite an index already existing on the filter column. What practice would prevent this?
Widening the existing index to include every column the query actually selects turns it into a covering index, eliminating the extra row lookup this incident describes. Leaving the index limited to only the filter column forces exactly that unnecessary extra lookup for every execution of the query. This widening is a common, high-impact optimization once a frequently run query's full column needs are identified.
5 / 5
During a PR review, a teammate asks why the team builds a covering index instead of a regular index on just the filter column, when the regular index already speeds up finding the matching rows. What is the reasoning?
A regular index on just the filter column speeds up finding the matching rows but still requires an extra lookup back to the table for any other column the query actually selects. A covering index eliminates that lookup entirely by including every needed column directly in the index itself. The tradeoff is a larger index that takes up more storage and costs slightly more to maintain on every write.