Use index hints in Microsoft SQL Server

Example of using Index hint in the query of Microsoft SQL Server

Check the query without using index hints:

select * from [HumanResources].[Employee]

Use index hint to forcefully use the index by executing SQL query:

Syntax: With (index = indexname)

Example:
select * from [HumanResources].[Employee] with (index =  [AK_Employee_LoginID])

1 thought on “Use index hints in Microsoft SQL Server

  1. Pingback: Best Choice mssql hint use index Update New - #1 Website cung cấp thông tin công nghệ mới nhất VN

Leave a Reply