SA0197 : The deprecated FASTFIRSTROW hint was encountered

The topic describes the SA0197 analysis rule.

Message

The deprecated FASTFIRSTROW hint was encountered

Description

The rule checks for FASTFIRSTROW hints are found within SQL code.

Rewrite statements to use the OPTION (FAST n) syntax.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

Design Rules, Deprecated Features, Bugs

Additional Information

There is no additional info for this rule.

Example Test Script
SQL
 1--- Table Hints ---
 2SELECT StartDate, ComponentID FROM Production.BillOfMaterials
 3    WITH( INDEX (FIBillOfMaterialsWithComponentID), FASTFIRSTROW /*IGNORE:SA0197*/ )
 4    WHERE ComponentID in (533, 324, 753, 855, 924);
 5
 6SELECT * FROM Sales.SalesOrderHeader  (FASTFIRSTROW)  AS h 
 7
 8SELECT * FROM Sales.SalesOrderHeader AS h (FASTFIRSTROW) 
 9
10SELECT * FROM Sales.SalesOrderHeader AS h
11OPTION (FAST 1)

Analysis Results

  Message Line Column
1 SA0197 : The deprecated FASTFIRSTROW hint was encountered. 6 39
2 SA0197 : The deprecated FASTFIRSTROW hint was encountered. 8 43
See Also

Other Resources