Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to migrate Oracle hint stament to Mssql?

Author  Topic 

spbblobo
Starting Member

2 Posts

Posted - 2013-09-20 : 08:48:50
Sorry I´m new in MSSQL and I need this hints to Oracle 10:

ls_hint = ' /*+ INDEX(INX$A1$A2) use_nl (a1, a2, a3, a4, a5, a6, a7) */ '

ls_hint = ' /*+ ORDERED INDEX (INX_A1) USE_NL(a1 a2 a3 a4 a5 a6 pa7 a8 ac9 a10 a11 a12 ) */ '

Please, any idea??

Thank you!

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2013-09-20 : 11:59:07
I can't help your with your specific question, but I'd suggest trying the queries without the hints and see how they perform. Hints can be valuable, but ,generally, are not needed in SQL Server.

Here is a link that may help:
http://technet.microsoft.com/en-us/library/ms187713.aspx
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2013-09-20 : 14:02:58
USE_NL appears to be equivalent to INNER LOOP JOIN hint. As Lamprey stated, hints are not always necessary, and in fact can make your query perform worse. Oracle and SQL Server have different optimizers, any hints should be thoroughly tested before applying in a production environment.
Go to Top of Page

spbblobo
Starting Member

2 Posts

Posted - 2013-09-22 : 10:12:59
In need the right equivalent for an application that use both, mssql and oracle dbs. And I need more or less the right translation.

Thank you
Go to Top of Page
   

- Advertisement -