DF195: FASTFIRSTROW hint is used.

The topic describes the DF195 T-SQL code analysis rule.

Category

Deprecated

Message

FASTFIRSTROW hint is used.

Description

The FASTFIRSTROW table hint is deprecated. Use OPTION(FAST n) instead.

Additional information

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.

Noncompliant code example

SELECT id
FROM dbo.DemoTable WITH(FASTFIRSTROW)
GO

Compliant solution

SELECT id
FROM dbo.DemoTable
OPTION(FAST 1)
GO

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?