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

%_Hints Statement Explanation (RSWWCOND)

Former Member
0 Likes
650

Hi Everyone,

I would appreciate any help you could give me on this. Basically I'm analyzing the standard program RSWWCOND to evaluate it's performance, how it works, etc. There is a Select statement contained within the program and the notation has just confused me a bit. The Select statement uses hints in the where clause (%_HINTS) which is fine. ::

SELECT wi_id INTO CORRESPONDING FIELDS OF TABLE lt_swwwihead

FROM swwwihead

WHERE

wi_type IN type AND

wi_stat EQ swfco_wi_status_checked AND

wi_rh_task IN task "Note 748688

%_HINTS DB2 'USE VALUES FOR OPTIMIZATION'

DB2 '&SUBSTITUTE VALUES&'

ORACLE 'INDEX("&TABLE&" "SWWWIHEAD~C" "SWWWIHEAD^C")'.

However one part of the statement is confusing me and that is the last line ::

ORACLE 'INDEX("&TABLE&" "SWWWIHEAD~C" "SWWWIHEAD^C")'.

I'd appreciate is someone could explain to me what the hat () symbol is doing when used in "SWWWIHEADC" . I've search around and can't seem to find anything to explain this notation.

Sincere thanks for your time.

Regards,

Damien

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
574

you statement has two hints for IBM DB2 databases and for oracle databases,

the oracle hints tell the optimizer to use a certain index, which is the index C.

these are two internal names for the same index: SWWWIHEAD~C" "SWWWIHEAD^C"

the optimizer picks the one it knows.

Siegfried

Hi Everyone,

I would appreciate any help you could give me on this. Basically I'm analyzing the standard program RSWWCOND to evaluate it's performance, how it works, etc. There is a Select statement contained within the program and the notation has just confused me a bit. The Select statement uses hints in the where clause (%_HINTS) which is fine. ::

SELECT wi_id INTO CORRESPONDING FIELDS OF TABLE lt_swwwihead

FROM swwwihead

WHERE

wi_type IN type AND

wi_stat EQ swfco_wi_status_checked AND

wi_rh_task IN task "Note 748688

%_HINTS DB2 'USE VALUES FOR OPTIMIZATION'

DB2 '&SUBSTITUTE VALUES&'

ORACLE 'INDEX("&TABLE&" "SWWWIHEAD~C" "SWWWIHEAD^C")'.

However one part of the statement is confusing me and that is the last line ::

ORACLE 'INDEX("&TABLE&" "SWWWIHEAD~C" "SWWWIHEAD^C")'.

I'd appreciate is someone could explain to me what the hat () symbol is doing when used in "SWWWIHEADC" . I've search around and can't seem to find anything to explain this notation.

Sincere thanks for your time.

Regards,

Damien

2 REPLIES 2
Read only

Former Member
0 Likes
575

you statement has two hints for IBM DB2 databases and for oracle databases,

the oracle hints tell the optimizer to use a certain index, which is the index C.

these are two internal names for the same index: SWWWIHEAD~C" "SWWWIHEAD^C"

the optimizer picks the one it knows.

Siegfried

Read only

0 Likes
574

Siegfried,

Thank you very much for taking the time to provide this most helpful answer. It is greatly appreciated.

Kind Regards,

Damien.