Using Indexes
This chapter has primarily been concerned with the structure of indexes and the nuances of creating and managing them. Hopefully, you’re aware of at least some of the places where indexes can be useful in your SQL Server applications. I will list a few of the situations in which you can benefit greatly from indexes; the details of how SQL Server decides which indexes to use, and how you can decide which indexes are the best to build for your queries, are explained in Inside Microsoft SQL Server 2005: Tuning and Optimization.
Looking for Rows
The most straightforward use of an index is to help SQL Server find one or more rows in a table that satisfy a certain condition. For example, if you’re looking for all the customers who live in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access