Al's BrainDump

RSS

Navigation





Quick Search
»
Advanced Search »

PoweredBy
MSDN Reference

Optimizer hints that effect the entire query - not specific to any 1 part of the query like a table hint.

The OPTION clause specifies the hint:

SELECT * FROM Sales.Customer AS c 
INNER JOIN Sales.CustomerAddress AS ca 
ON c.CustomerID = ca.CustomerID 
WHERE TerritoryID = 5 
OPTION (MERGE JOIN);

Hints such as:
MAXDOP
RECOMPILE
KEEP PLAN
FAST number_rows
FORCE ORDER (of tables as they are given in join clauses)


ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.