The topic describes the DF195 T-SQL code analysis rule.
Deprecated
FASTFIRSTROW hint is used.
The FASTFIRSTROW table hint is deprecated. Use OPTION(FAST n) instead.
The OPTION(FAST n) hint provides better control over query execution by specifying the number of rows the query optimizer should process before returning results. This allows for improved query performance and responsiveness, especially in scenarios where retrieving the first few rows quickly is essential. Migrating to OPTION(FAST n) ensures compatibility with future versions of SQL Server and aligns with best practices for query optimization.
SELECT id
FROM dbo.DemoTable WITH(FASTFIRSTROW)
GO
SELECT id
FROM dbo.DemoTable
OPTION(FAST 1)
GO