SQL Flow Field Guide

TABLE HINT INDEX ( <index_value> [ , ...n ] ) | INDEX = ( <index_value> )

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

The INDEX() syntax specifies the names or IDs of one or more indexes to be used by the query optimizer when it processes the statement.

What changes

Input
none
Output or change
none

Syntax at a glance

WITH ( INDEX ( <index_value> [ , ...n ] ) | INDEX = ( <index_value> ) )

Work example

A measured plan issue may justify investigating TABLE HINT INDEX ( <index_value> [ , ...n ] ) | INDEX = ( <index_value> ) for one known query shape.

Save the actual plan and runtime metrics first. Test representative parameter values and remove the hint if the plan no longer fits.

Check your work TABLE HINT INDEX ( <index_value> [ , ...n ] ) | INDEX = ( <index_value> ). The plan property affected by TABLE HINT INDEX ( <index_value> [ , ...n ] ) | INDEX = ( <index_value> ) changes as intended and reads, duration, and result rows remain acceptable.

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