-495 ESTIMATED PROCESSOR COST OF estimate-amount1 PROCESSOR SECONDS (estimate-amount2 SERVICE UNITS) IN COST CATEGORY cost-category EXCEEDS A RESOURCE LIMIT ERROR THRESHOLD OF limit- amount SERVICE UNITS
Explanation
- estimate_amount1
- The cost estimate (in processor seconds) if the prepared INSERT, UPDATE, MERGE, DELETE or SELECT statement were to be executed.
- estimate_amount2
- The cost estimate (in service units) if the prepared INSERT, UPDATE, MERGE, DELETE or SELECT statement were to be executed.
- cost-category
- The DB2 cost-category for this SQL statement. The possible values are A or B.
- limit-amount
- The error threshold (in service units) specified in the RLFASUERR column of the RLST. If you entered any negative number for the RLFASUERR column, the value for limit-amount defaults to zero.
System action
The prepare of the dynamic INSERT, UPDATE, MERGE, DELETE, or SELECT statement was unsuccessful.
User response
If the warning is caused by an SQL statement that is consuming too much processor resource, attempt to rewrite the statement to perform more efficiently. Another option is to ask the administrator to increase the error threshold value in the RLST.
Programmer response
If this SQLCODE was returned because the cost category value is "B", it might be that the statement is using parameter markers or that some statistics are not available for the referenced tables and columns. Make sure the administrator has run the utility RUNSTATS on the referenced tables. It might also be that UDFs will be invoked when the statement is executed, or for INSERT, UPDATE, MERGE, or DELETE statements that triggers are defined on the changed table. Check the DSN_STATEMNT_TABLE or the IFCID 22 record for this statement to find the reasons this SQL statement has been put in cost category "B". If the program cannot be changed, or if statistics cannot be obtained, ask the administrator to change the value in the RLF_CATEGORY_B column in the RLST to "Y" which allows the statement to execute or "W" which returns a warning instead of an error.
SQLSTATE
57051