
use pubs
go

sp_helpindex 'dbo.authors'

set statistics io on
go

-- clustered index scan
select * from authors
where au_lname = 'White'

-- uses covering index
select au_id, au_fname, au_lname
from authors
where au_fname like 'R%'
order by au_fname

-- can't cover the query, back to clustered index
select au_id, au_fname, au_lname, city
from authors

create index myidx on authors(au_lname, au_fname) include(city)