Defining and Managing Indexes

Now that you have seen what indexes are and what they can do for the performance of your SQL queries, you will learn how to create and maintain any indexes on your database. Before you start creating indexes, you need to consider where you need indexes and on which columns. In addition, you also must decide whether to use clustered or nonclustered indexes. When considering whether to create an index on a column, you should consider whether and how an indexed column is going to be used in a query. What follows are some suggestions in deciding if indexes are useful in a query:

  • Searches for rows that match a specific search key value (an exact match query). An exact match comparison is one in which the query uses the ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.