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: 

What is the use of %_HINTS DB2 'USE VALUES FOR OPTIMIZATION'?

Former Member
0 Kudos

In one of our system, VYSPA job is running for long time. When we did a SQL trace one of the SQL in the standard module which is using this statement '%_HINTS DB2 'USE VALUES FOR OPTIMIZATION' was ran for long time. More over we are using DB6 database but the hint was defined with DB2.

But same VYSPA job is running in production with less number of secs. Can any one please help me on this.

1 REPLY 1

former_member192616
Active Contributor
0 Kudos

Hi,

don't worry regarding the hin.

If you are not on DB2 it will not be sent to your DB6 database (you won't see it in the native SQL in ST05).

Regarding your problem you need to do an explain plan to see the execution plan. There you can see how the data is accessed. If an index is used, which index is used, how it is used, ... .

ST05 itself gives some hints as well, look at the time per record if this is > 10000 microseconds it can indicate execution plan problems... it it is in the microsecond or small millisecond range and the number of records returned is high the execution plan will not be of much help you need to work on the application then.

Kind regards,

Hermann