Covered Query vs. Covering Index
What constitutes a covered query? What’s the definition of a covering index? And when do you use one, or the other, or both? Microsoft’s SQL Server development team sheds light on one reader’s question.
November 25, 2002
What's the difference between a covered query and a covering index?
Covered queries and covering indexes are different, yet closely related. A query is covered if all the columns it uses come from one or more indexes. These columns include the columns you want the query to return as well as columns in any JOIN, WHERE, HAVING, and ORDER BY clause. A covered query typically is considered advantageous because data access through indexes can be more efficient. However, the high-speed access that this kind of query facilitates can become costly when you update the table because you must maintain the indexes.
A covering index—which is used in covered queries—can provide some or all of the indexed columns that a covered query uses. If a covering index is also a composite index (i.e., it indexes more than one column in its base table or view), it might contain columns that aren't used in the covered query but are used instead in other queries that have overlapping columns.
About the Author
You May Also Like