CHAPTER  7

Image

Indexing Outside the Bubble

By Jason Strate

When it comes to indexing, there are many best practices we could adhere to. These practices help define how and when we should build our indexes. They provide a starting point for us, and help guide us through creating the best set of indexes on the tables in our databases. Some popular best practices include the following:

  • Use clustered indexes on primary keys, by default.
  • Index on search columns.
  • Use a database-level fill factor.
  • Use an index-level fill factor.
  • Index on foreign key columns.

This list provides a glimpse of what we should be looking for when indexing a table. The one ...

Get Pro SQL Server 2012 Practices 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.