To enable adaptive join in SQL Server, the compatibility level, the database setting and the query must all agree. This post builds a demo database and probes the plan under each condition. It also corrects older advice whose statements switch the feature off.
Adaptive Threshold Rows: How an Adaptive Join Chooses
Adaptive threshold rows is the row count at which an adaptive join switches from nested loops to a hash join. This post runs two queries on WideWorldImporters, reads each threshold from the cached plan, and shows which branch ran. The first query stays below its threshold and the second goes above it.
Find Expensive Queries – SQL in Sixty Seconds #159
Earlier I wrote a blog post about SQL SERVER – List Expensive Queries – Updated March 2021. Let us learn how to Find Expensive Queries.
CHECKPOINT Covers One Database: Flush Data to Disk
CHECKPOINT covers one database, so to flush data to disk you run it in each database. A demo with two databases shows one flushed and one still dirty. A short script then flushes every database in one pass, and the post says when a flush is worth it.
Auditing Query Hints Left in Production Code
Start auditing query hints in modules and Query Store, rank the busiest statements, and test removal with measured plans and rollback.
Expensive Queries by query_hash: Total Cost, Not One Plan
Expensive queries by query_hash are ranked by total cost, not by single plans. A demo runs one lookup with 40 different literals and shows that the top single plan is a scan, while the grouped total, ranked by reads, points at the lookup. The query ranks by reads, CPU, time or runs.
Case-Sensitive Search – SQL in Sixty Seconds #158
Earlier I wrote a blog post about SQL SERVER – Case-Sensitive Search. Lots of people said I should make a video on this topic.







