Chapter 6. Indexes

After completing this chapter, you will be able to

  • Understand the structure of indexes

  • Create clustered and nonclustered indexes

  • Create indexes with included columns

  • Create covering indexes

  • Create filtered indexes

  • Create XML indexes

  • Manage indexes and deal with index fragmentation

Indexes are used to improve the performance of data requests. In a perfect world, you could create large numbers of indexes to satisfy every query permutation that a user might create. However, indexes must be maintained. As data is inserted, updated, and deleted, indexes need to be recalculated. The creation of indexes must be balanced, so that you create enough indexes to improve queries while also ensuring minimal impact to data modifications.

In this chapter, ...

Get Microsoft® SQL Server® 2008 Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.