DEFAULT WITH VALUES fills the rows that already exist when you add a column with a default. Without it, a nullable column keeps NULL in every old row. This post shows the three cases side by side, what a default never does, why the constraint needs a name, and how a large table takes the change in a millisecond.
Nonclustered Primary Key Test: Last Page Insert Waits
A nonclustered primary key test shows whether a heap fixes last page insert waits. On SQL Server 2025 it doesn’t, because the key index still rises. A lane layout that spreads the inserts removes the latch wait, and the post shows the cost of that layout.
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.
Show Primary Key of a Table in SQL Server With sp_pkeys
To show primary key columns for one table, call sp_pkeys with the table name. This post builds a small demo database, reads a single column and a composite key, and handles schemas and errors. It also lists every key in a database with one catalog query.
Foreign Key Checks in Insert Plans: The Cost of Each Constraint
Before you drop a foreign key to speed up a load, look at what it costs. This walk-through shows the Assert, the two parent lookups, and the trust trap.
Enforcing Formats With a REGEXP_LIKE Check Constraint
Stop badly shaped product codes before they reach a report. A short, tested walk-through of anchors, NULLs and adding the rule to old data.







