Our databases consist of lots of tables, most of them using an integer surrogate key as a primary key. About half of these primary keys are on identity columns.

The database development started in the days of SQL Server 6.0.

One of the rules followed from the beginning was, Avoid creating a clustered index based on an incrementing key, as you find in these Index Optimization Tips.

Now using SQL Server 2005 and SQL Server 2008, I have the strong impression that the circumstances changed. Meanwhile, these primary key columns are perfect first candidates for the clustered index of the table.

4 Answers 4


The myth goes back to before SQL Server 6.5, which added row level locking. And hinted at here by Kalen Delaney.

It was to do with "hot spots" of data page usage and the fact that a whole 2k page (SQL Server 7 and higher use 8k pages) was locked, rather then an inserted row Edit, Feb 2012

Found authoritative article by Kimberly L. Tripp

"The Clustered Index Debate Continues..."

Hotspots were something that we greatly tried to avoid PRIOR to SQL Server 7.0 because of page level locking (and this is where the term hot spot became a negative term). In fact, it doesn't have to be a negative term. However, since the storage engine was rearchitected/redesigned (in SQL Server 7.0) and now includes true row level locking, this motivation (to avoid hotspots) is no longer there.

Edit, May 2013

The link in lucky7_2000's answer seems to say that hotspots can exist and they cause issues. However, the article uses a non-unique clustered index on TranTime. This requires a uniquifier to be added. Which means the index in not strictly monotonically increasing (and too wide). The link in that answer does not contradict this answer or my links

On a personal level, I have woked on databases where I inserted tens of thousands of rows per second into a table that has a bigint IDENTITY column as the clustered PK.


To sum it up, in modern SQL Server versions a clustered key on an identity column is the preferred option these days.

  • 12
    This sounds like a command. No explanation or logic as to why we should...
    – gbn
    Feb 1, 2012 at 8:37
  • Not only does it sound like a command, it is also wrong. Any database taking a very high amount of inserts/sec will hit hotspot issues if you use sequential keys. Feb 6, 2015 at 16:59
  • 1
    I said preferred, not required. For normal applications that make up 98% of the databases in the world a clustered key on an identity column works just fine.
    – mrdenny
    Feb 9, 2015 at 18:25

Kimberly Tripp has a fantastic blog post about just this topic. I could paraphrase, but trust me, I wouldn't do it justice. Have a read. http://www.sqlskills.com/BLOGS/KIMBERLY/post/Ever-increasing-clustering-key-the-Clustered-Index-Debateagain!.aspx

While there, check out some of her other posts on the topic of clustering keys. There is a good wealth of knowledge to be had from her site.


check this post:


creating a clustered index based on an incrementing key may create hot spots that bad for the performance...

  • 1
    +1 for giving that link. There are some interesting hints there. But I think the result would be much more convincing, if he had compared the the given scenario with one with create nonclustered index cidx_trantime on tblTransactions (TranTime) or some other alternative. Remember when you generate such a lot of data there must be efficient ways to retrieve the data, you can't just throw every thing into a heap.
    – bernd_k
    Sep 18, 2011 at 13:52
  • @bernd_k: this is a poor example link. The child table has a bad non-unique clustered key that requires an internal uniquifier
    – gbn
    May 2, 2013 at 14:13
  • 1
    Try this experiment then: kejser.org/boosting-insert-speed-by-generating-scalable-keys Feb 6, 2015 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.