Indexes & Performance · SQL SQL
What does a 'covering index' achieve in relational database performance optimization?
Practice question from Indexes & Performance (SQL SQL), with the correct answer and a step-by-step solution.
medium · MCQ · Q-1C2215
What does a 'covering index' achieve in relational database performance optimization?
- A.It hides sensitive column data from unauthorized users
- B.It satisfies a query completely from the index itself without requiring a separate lookup to the table heapCorrect answer
- C.It covers all foreign key constraints across multiple tables automatically
- D.It prevents deadlocks during concurrent write operations
Solution
A covering index contains all the columns needed to satisfy the query (both in the WHERE clause and the SELECT list). This allows an 'Index Only Scan', avoiding random I/O heap fetches to retrieve table rows.
More from Indexes & Performance
- What is the primary purpose of a B-tree index on a relational database column?
- Consider a table users with columns (id SERIAL PRIMARY KEY, email VARCHAR(255), status VARCHAR(50)). If a query frequently filters by email…
- Which of the following scenarios is most likely to result in an index being ignored by the query optimizer during a SELECT query with a WHE…
- What is a partial index, and when is it most advantageous to use one?
Practise more SQL
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed