SQL Server Optimizer Hints

What if a hint you specify is not used? Just because you add a hint to a query, it doesn’t mean that SQL Server will use it. For example, if you add a hint that a specific index should be used in a query, but the Query Optimizer doesn’t need to access the table because it found a relevant Indexed View to use instead, the hint will be ignored.

In another case, locking hints are ignored in cases where the “hinted” column includes computed columns and these columns are computed by functions or expressions accessing columns in other tables.

In most cases, if you notice that a hint you have specified is not used, it is most likely because is not appropriate (you made a mistake). So if a hint is not used, check your hint to see if it is appropriate. [7.0, 2000, 2005] Updated 5-1-2006

Pages: 1 2




Related Articles :

  • No Related Articles Found

No comments yet... Be the first to leave a reply!

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |