5 Designing Indexes for JOINs
Now let’s move on to multi-table queries. When you join multiple tables together like this, and you’ve got multiple indexes, how does SQL Server choose which index to use? Would it use an index on Comments.UserId, or one on Comments.Score? Or will it use both, since it needs to both filter and sort? Transact-SQL SELECT…
