SQL SERVER – Clustered Index on Separate Drive From Table Location

How to improve performance of SQL Server Queries is a common topic of discussion among many of us. Much has been said, much has been discussed. Few days back, I had an interesting discussion with one of the Junior developers regarding performance improvement of SQL Server Queries. We discussed on how by using a separate hard drive for several database objects can right away improve performance. I suggested him that non clustered index and tempdb can be created on a separate disk to improve performance.

Read More

SQL SERVER – Effect of Normalization on Index and Performance

Of late, I have been using Twitter quite frequently, and I am gradually discovering its usefulness. I received a Direct Message (or DM in terms of twitter) asking if I can comment on the effect of normalization on the Index and its performance in one twit! Now honestly speaking, this was new for me. I never expected to be quizzed like this. If you are using Twitter, then you must be aware that one twit contains only 140 characters. I was supposed to give answer on such a big subject in just 140 letters. An interesting fact is that normalization and the Index are not really closely related. The right question should have been – what is the effect of normalization on performance?

Read More

SQL SERVER – Maximum Columns per Primary Key – Fix : Error : Msg 1904, Level 16, The index on table has column names in index key list. The maximum limit for index or statistics key column list is 16

My present article covers two fundamental questions. 1) What is the maximum number of columns included in Primary Key Index/Constraint? 2) What is fix/solution for the following error: Msg 1904, Level 16, State 1, Line 1 The index ” on table ‘dbo.Table_2’ has 17 column names in index key list.…
Read More

SQL SERVER – Automated Index Defragmentation Script

Index Defragmentation is one of the key processes to significantly improve performance of any database. Index fragments occur when any transaction takes place in database table.  Fragmentation typically happens owing to insert, update and delete transactions. Having said that, fragmented data can produce unnecessary reads thereby reducing performance of heavy…
Read More

SQL SERVER – Reseed Identity of Table – Table Missing Identity Values – Gap in Identity Column

Some time ago I was helping one of my Junior Developers who presented me with an interesting situation. He had a table with Identity Column. Because of some reasons he was compelled to delete few rows from the table. On inserting new rows in the table he noticed that the…
Read More