Compare EXISTS, IN, and JOIN for semi-joins, prevent duplicate customer rows, and handle NULL safely in exclusion queries.
Histogram Buckets in T-SQL: Counting Values per Range
Create histogram buckets in T-SQL with fixed widths or explicit ranges, retain empty buckets, and display scaled text bars.
SQL SERVER – Modern Explicit JOIN Syntax – A Brief Note
Over time, SQL has evolved and offers two distinct styles for performing JOIN operations: the old-style comma-separated join and the more modern explicit JOIN syntax.
SQL SERVER – Making Recursive Parent-Child Queries Efficient
One puzzle is finding out how many employees each manager is responsible for in a company. Let us Make Recursive Parent-Child Queries Efficient.
Avoid Join Hints – SQL in Sixty Seconds #172
Question: If they can change the join hints to improve the performance of the query. Well, the reality is that I always Avoid Join Hints.
Change Join Type for a Query: HASH, LOOP and MERGE Hints
To change join type for a query, add one of three hints to its OPTION clause. This post runs one join with each hint on two filters and compares the join type and the logical reads. It shows that no join type is best in general, and what a join hint in the FROM clause does to the join order.
Disable Adaptive Join for One Query or a Whole Database
To disable adaptive join for one query, add a USE HINT to it. This post also shows a Query Store hint for code you cannot edit and the database setting that switches the feature off for everything. Each switch is tested on a small demo database and checked in the plan.







