Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
4 posts found #join
Reading Execution Plans 1: Estimated vs Actual Plans, Operators and Join Algorithms
Database PART 05

Reading Execution Plans 1: Estimated vs Actual Plans, Operators and Join Algorithms

An execution plan is read right to left, inside out; the first thing to check is not cost percentage but estimated versus actual rows and how many times each operator ran. Where cost percentage misleads in the actual plan of an EF Core Include query, seek/scan/lookup, the measured cost of nested loops, merge and hash joins on the same query, stream and hash aggregates, and going from 2,549 to 689 logical reads with two indexes.

8 Nov 2026 10 min 4
SQL JOINs 2: Self Join, Non-Equi Join, Semi/Anti Join and CROSS APPLY vs LATERAL
Database PART 09

SQL JOINs 2: Self Join, Non-Equi Join, Semi/Anti Join and CROSS APPLY vs LATERAL

Joining an order's items and payments together multiplies the totals (fan-out); the fix is to group first and join afterwards. We show CROSS JOIN report skeletons, a self join on the category tree, non-equi range joins, semi joins with EXISTS, anti joins with NOT EXISTS (same plan as LEFT JOIN … IS NULL), and every customer's last three orders with T-SQL CROSS/OUTER APPLY versus standard LATERAL in PostgreSQL and MySQL, with real output.

8 Nov 2026 13 min 3
SQL JOINs 1: INNER JOIN, LEFT/RIGHT/FULL OUTER JOIN and the ON vs WHERE Difference
Database PART 08

SQL JOINs 1: INNER JOIN, LEFT/RIGHT/FULL OUTER JOIN and the ON vs WHERE Difference

Joins match rows; they are not Venn diagrams: INNER JOIN keeps matched pairs, and LEFT/RIGHT/FULL OUTER JOIN also keep the preserved side's unmatched rows with NULLs. Filtering the right table of a LEFT JOIN in WHERE silently turns it into an INNER JOIN, which we see as Inner Join in the plan. We look at books without reviews, customers without orders, stock reconciliation with FULL OUTER JOIN and how one-to-many joins multiply rows, with real output.

8 Nov 2026 12 min 4
LINQ Join and GroupJoin: Inner Join, Composite Keys and the Left Join Pattern
Backend PART 10

LINQ Join and GroupJoin: Inner Join, Composite Keys and the Left Join Pattern

How Join, as an inner join, drops unmatched rows and multiplies multiple matches, and its documented order. The direction of equals in query syntax and CS1937/CS1938, composite keys and CS1941, hierarchical results with GroupJoin, the left join pattern with GroupJoin + DefaultIfEmpty and its null trap, multiple joins, and how Join runs in n + m with a lookup.

7 Nov 2026 11 min 9
Blog Map