5 Designing Indexes for ORDER BY and JOINs
First, let’s tack on ORDER BY with equality searches, inequality searches, and TOP: 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 […]