posted on Tuesday, February 22, 2005 8:58 AM by amachanic

SQL Server 2005: Query Plan Guides

Thanks to Bob Beauchemin for pointing out the new query plan guides feature in SQL Server 2005.

This is a very cool sounding feature. Apparently we will be able to define query hints for queries WITHOUT modifying the queries themselves (i.e. stored procedures -- OR ad hoc SQL, I'm hoping). This means that:

A) Stored procedures will not have to be edited for different environments. If a query hint is needed in a certain environment, it can be added without modifying the code -- and without risk of damaging the code's integrity and symmetry with the code checked in to the source control system (you do use source control, right?).

B) If ad hoc SQL is being generated from applications, adding query hints will not require a recompile. And again, this will greatly assist with configuration within different environments.

Based on my current understanding of this feature, I'm really looking forward to it. Hopefully the implementation will be as good as it sounds!

Comments