What is going on with their server as I had no access to their data or schema. Let us learn about how identity and constraint confusion created problems.
Nonclustered Primary Key – SQL in Sixty Seconds #119
I will describe in detail a bit later on during this blog post. Today we are going to learn that it is possible to have a nonclustered primary key.
SQL SERVER – Resolving Last Page Insert PAGELATCH_EX Contention Changing Primary Key to Non-Clustered
You can change your clustered primary key to Non-clustered Primary Key and can get the benefit of performance by reducing Pagelatch_EX.
SQL SERVER – Resolving Last Page Insert PAGELATCH_EX Contention with OPTIMIZE_FOR_SEQUENTIAL_KEY
I have personally implemented the solution suggested of resolving contention about creating an index with OPTIMIZE_FOR_SEQUENTIAL_KEY at my client’s place.
SQL SERVER – Last Page Insert PAGELATCH_EX Contention Due to Identity Column
Today’s goal is to understand what is the Last Page Insert PAGELATCH_EX Contention Due to Primary Key. Let us start understanding it together.
Loading Only New Rows: INSERT SELECT With NOT EXISTS
Make loading only new rows repeatable with NOT EXISTS, EXCEPT, source deduplication, and a unique key that protects the destination.
SQL SERVER – Show Primary Key for a Single Table – sp_pkeys
Recently, one of my clients showed me a very cool trick to check Primary Key for a single table with the help of the system stored procedure sp_pkeys.




