Application Development 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: 

HINTS in Select Statement

Former Member
0 Kudos

Hi,

Can anybody explain me why HITS keyword is used with SELECT statement, whats the use of if, How to find the HINTS for a particular table.

SELECT recn, recnroot, ippers

INTO CORRESPONDING FIELDS OF TABLE <ITAB1>

FROM CCIHT_IP

FOR ALL ENTRIES IN <ITAB2>

WHERE ippers = <ITAB2>-ippers

AND valfr LE sy-datum

AND valto GE sy-datum

AND iptype = 'INJ'

%_hints db2 '&max_blocking_factor 500&&max_in_blocking_factor 500&u2019.

-Rajiv

1 ACCEPTED SOLUTION

Former Member
0 Kudos

% HINTS is used to give particular instructions to the database when executing the SELECT statement.. in your case your database seems to be DB2 and then the two parameters are being set to the values specified probably to increase performance

Note 150037 - Database hints in Open SQL for DB6 (DB2 for LUW) should help!

Edited by: Saravanan Ramasamy on Nov 12, 2009 9:49 AM

4 REPLIES 4

former_member186746
Active Contributor

0 Kudos

Nothing is displayed in that link

Former Member
0 Kudos

% HINTS is used to give particular instructions to the database when executing the SELECT statement.. in your case your database seems to be DB2 and then the two parameters are being set to the values specified probably to increase performance

Note 150037 - Database hints in Open SQL for DB6 (DB2 for LUW) should help!

Edited by: Saravanan Ramasamy on Nov 12, 2009 9:49 AM

NAeda
Contributor
0 Kudos

Hi,

Complex database statements or large numbers of secondary indexes that can be very

similar make it difficult for the database optimizer and the R/3 database interface to process

most efficiently. In some database systems, you can expressly influence decisions made by

database optimizer by what are known as hints.

Ex- %_HINTS ORACLE '&SUBSTITUTE VALUES&'.

Search with HINTS in SELECT STATEMENT you will get so many ans