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

68820 pts.
Tags:
Microsoft SQL Server
Optimizer
Oracle
SQL
SQL Server
SQL tuning
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following