Skip to main content

What is a Key Lookup? Why is it expensive?

Junior MS SQL
Quick Answer Key lookup (aka Bookmark Lookup) happens when a non-clustered index finds the row, but the query needs extra columns not in the index รขโ‚ฌโ€ SQL Server fetches those from the clustered index. Each lookup is a random I/O. With thousands of rows, this stacks up. Adding INCLUDE columns to the index eliminates it.

Answer

Key lookup happens when a non-clustered index finds a row but SQL needs extra columns. It causes many random I/O operations and slows queries.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice