We talked about why you should use a clustered index in T-SQL Tip 4. Now let’s talk about what to make the clustered index. Here’s an acronym for things that make a good clustered index:

  • One Column: Small data footprint, generally not strings, one column
  • Unique: Something that by design won’t repeat
  • Increasing. You won’t put a row in the middle of what already exists
  • Immutable: Unchanging, and not going to be updated

It’s for those characteristics that I generally recommend an int or bigint IDENTITY column.