Specifying Query Processing Hints
SQL Server 2014 enables you to specify additional query hints to control how your queries are optimized and processed. You specify query hints at the end of a query by using the OPTION
keyword. There can be only one OPTION
clause per query, but you can specify multiple hints in an OPTION
clause, as shown in the following syntax:
OPTION (hint1 [, ...hintn])
Query hints are grouped into four categories: GROUP BY, UNION, JOIN, and miscellaneous.
GROUP BY Hints
GROUP BY hints specify how GROUP BY
or COMPUTE
operations should be performed. The following GROUP BY hints can be specified:
HASH GROUP—This option forces the Query Optimizer to use a hashing function to perform the GROUP ...
Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.