SQL Flow Field Guide

Join hints

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

forces physical join strategy

What changes

Input
none
Output or change
none

Syntax at a glance

<join_hint> ::= { LOOP | HASH | MERGE | REMOTE | REDUCE | REPLICATE | REDISTRIBUTE [(columns count)]}

Work example

A measured join-plan issue needs one algorithm hint tested against SQL Server's default choice.

Capture the unhinted plan, reads, and runtime. Test one join hint with representative row counts and parameter values.

Check your work Join hints. The intended join algorithm appears and result rows remain unchanged across the comparison.

Open Microsoft Learn for full syntax, permissions, and details for your version.