Does something similar to Oracle’s optimizer hints exist in SQL Server ?

79775 pts.
Tags:
Oracle
SQL
SQL Server
In Oracle, one can alter execution plans for SQL statements manipulating the optimizer with the help of hints. Hints can be used to alter access paths, join orders, etc... Does something similar exist in Microsoft Sql Server ?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Yes to some extent.

You can use locking hints to change the way that SQL Server locks the tables. You can use execution plan hints to change the way that SQL Accesses the table by forcing it to use a specific index.

If you want to you can statically set an execution plan into the plan cache for a specific query so that it always uses your plan. This is called pinning the plan and is new in SQL Server 2005.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: