The index only covers the column last_name
, and only contains data about that column. You can conceptually think about the index that you've described as a series of pairs: (last_name,row)
, where row
is a reference to a particular row in the actual table. The index stores the pairs sorted by last_name
, but stores no additional information about the table.
Your query requests all of the columns of Persons
. The index is used to locate the row or rows where last_name
is "Hogg", but the database has to reference the table to retrieve the additional columns.
What you appear to want is a covering index for the columns of interest. The term "RID lookup" implies SQL Server. Perhaps the question What are Covering Indexes and Covered Queries in SQL Server? and the page it points to: Using Covering Indexes to Improve Query Performance will help.