Click or drag to resize

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, New Rules

Additional Information

There is no additional info for this rule.

Example Test Script
 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

 MessageLineColumn
1SA0197 : The deprecated FASTFIRSTROW hint was encountered.639
2SA0197 : The deprecated FASTFIRSTROW hint was encountered.843
See Also

Other Resources