+495 ESTIMATED PROCESSOR COST OF estimate-amount1 PROCESSOR SECONDS (estimate-amount2 SERVICE UNITS) IN COST CATEGORY cost-category EXCEEDS A RESOURCE LIMIT WARNING THRESHOLD OF limit- amount SERVICE UNITS

Explanation

The prepare of a dynamic INSERT, UPDATE, MERGE, DELETE, or SELECT SQL statement resulted in a cost estimate that exceeded the warning threshold value specified in the resource limit specification table (RLST). This warning is also issued if the Db2 cost category value was B, and the default action specified in the RLF_CATEGORY_B column in the RLST is to issue a warning.
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 warning threshold (in service units) specified in the RLFASUWARN column of the RLST. If you entered any negative number for the RLFASUWARN column, the value for limit-amount defaults to zero.

System action

The prepare of the dynamic INSERT, UPDATE, MERGE, DELETE, or SELECT statement was successful. An SQLCODE -905 might be issued if the execution of the prepared statement exceeds the ASUTIME value specified in the RLST.

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 warning threshold value in the RLST.

Programmer response

Ensure that there is application logic to handle the warning to either allow the statement to execute or to stop the statement from being executed. 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.

SQLSTATE

01616