Hints in T-SQL (SQL Server 2000)

Hints in T-SQL (SQL Server 2000)

Post by QXBhcm5 » Wed, 14 Apr 2004 13:36:04


I want the help on the SQL Server HINTS. In Oracel we use the hints in the following manner


Similarly, i found the help on SQL Server HINTS. They are used with the Keyword 'OPTION' at the end of SELECT statement

Here i want to know more about the hints. In specific, i would like to know about the 'OPTION (FORCE ORDER)' hint in sql server

If any one if you have any idea regarding this then do let me

Thanking all of u in advance.

Hints in T-SQL (SQL Server 2000)

Post by Sue Hoegem » Wed, 14 Apr 2004 14:05:18

Still migrating things? SQL Server uses a cost based
optimizer and it's generally better to let SQL Server figure
out the most efficient plans. In general, you don't see
hints being used in SQL Server to the same degree they are
used in Oracle. For the most part, you'd want to have a good
specific reason for using them in SQL Server. I've seen
cases where hints being used actually hurt performance more
than helped. Have you come up with something specific on the
execution of a query that you'd want to use this?


On Mon, 12 Apr 2004 21:36:04 -0700, Aparna