Make loading only new rows repeatable with NOT EXISTS, EXCEPT, source deduplication, and a unique key that protects the destination.
The VALUES Table Constructor: Using a List as a Table
Use a VALUES table constructor for inline mappings and joins, understand the INSERT row limit, and move larger reusable lists into tables.
How Much Space Does a NULL Take? NULL Storage in Rows
Measure NULL storage in ordinary rows, compare fixed and variable columns, inspect record size, and test sparse and compressed designs.
SQL SERVER – Parameter Sniffing and OPTIMIZE FOR UNKNOWN
I consider myself fortunate that I receive a follow-up question from my blog posts. Let’s discuss Parameter Sniffing and OPTIMIZE FOR UNKNOWN.
Parameter Sniffing Local Variable: What the Trick Fixes
The parameter sniffing local variable trick copies a parameter into a variable so SQL Server cannot sniff it. This post measures the estimate and the page reads of a sniffed and a local variable procedure, called in both orders. It shows what the trick fixes, and what it leaves slow.
SQL SERVER – Parameter Sniffing Simplest Example
Today we will see a very simple example of the Parameter Sniffing. Let us see a very simple example of the parameter sniffing.
Copy Database Without Statistics and Query Store Data
To copy database without statistics, add NO_STATISTICS and NO_QUERYSTORE to DBCC CLONEDATABASE. This post shows why that matters, because histograms and Query Store texts hold real values. It also shows the plan estimate that changes, how to make a clone writable, and what VERIFY_CLONEDB does.







