The topic describes the DF211 T-SQL code analysis rule.
PERFORMANCE
Index hint is used.
For better performance, avoid using index hints.
It is worth mentioning that using index hints can have implications for performance and query optimization. While index hints can sometimes be useful in guiding the query optimizer to choose a specific index, they can also lead to suboptimal query plans and hinder the database’s ability to adapt to changing conditions or statistics. Instead, it is generally recommended to rely on the query optimizer’s capabilities to choose the most efficient execution plan based on available indexes, statistics, and query parameters.
UPDATE d
SET txt = 'sample'
FROM dbo.DemoTable d WITH(INDEX(MyIndex))
WHERE id = 1
GO
UPDATE d
SET txt = 'sample'
FROM dbo.DemoTable d
WHERE id = 1
GO