Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Optimizer Hints

Former Member
0 Likes
939

Hi All,

Can you please tell me how do you set the Optimizer Hint for setting the optimization level to 0 (Zero) for a database. I want to do it through ABAP. Please provide an example.

Thanks,

Arun.

5 REPLIES 5
Read only

Former Member
0 Likes
713

Hi Arun,

Here is an example of indicating an optimiser hint from within ABAP:


SELECT carrid connid cityfrom
FROM spfli INTO (xcarrid, xconnid, xcityfrom)
WHERE carrid = 'LH ' AND cityfrom = 'FRANKFURT'
%_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'.
WRITE: / xcarrid, xconnid, xcityfrom.
ENDSELECT. 

This should help you with setting the hint of setting optimisation level to zero.

Cheers,

Brad

Read only

0 Likes
713

Hi Brad, hi everyone,

😮

I didn't know it was possible to specify Oracle hints inside ABAP sentences. I've searched for this special syntax, but found nothing. I'm using release 4.6C. Anyone can show me some docs? I would really appreciate it.

Thanks very much in advance. BR,

Alvaro

Read only

0 Likes
713

Hi Alvaro,

I don't know of any help for this feature (although I haven't looked).

I actually discovered it on SDN!!

It was in a thread, so I guess if you search for "hints" in the ABAP forums you should find some details.

Cheers,

Brad

Read only

0 Likes
713

Hi Brad,

well... I could manage to find something via Google: http://www.sapbasis.ru/articles/opensqlhints/

...but, you know, I should say that I have trouble even in my native Spanish, imagine with Russian 😜

I put this webpage into an on-line russian-to-english translator... it worked fine...

It links to these SAP Notes:

129385. Database hints in Open SQL

130480. Database hints in Open SQL for Oracle

133381. Database-Hints in Open SQL for MS SQL Server

150037. Database hints in Open SQL for DB6 (DB2 UDB)

581293. DBSL for Oracle: statement cache

652096. Database hints in open SQL for SAPDB

772497. FAQ: Oracle Hints

As you suggested, I've searched into the SDN forums, and I still think this link I'm sending is quite thorough, IMHO.

Thanks very much again. BR,

Alvaro

Read only

0 Likes
713

Hey folks!

I think this russian webpage is some sort of translation of the SAP Notes it mentioned.

BR,

Alvaro