When you capture tuning data for SQL procedures, the collected data is presented next to the source code for each procedure. Application developers or database administrators can use this data to more efficiently tune resource-consuming statements or algorithms.
SQL procedure profiling is only supported for SQL procedures that target DB2 for Linux®, UNIX®, and Windows®, Version 8.2 or higher.
When you capture tuning data for SQL procedures, events are generated for DML statements, such as INSERT, SELECT, DELETE, and UPDATE, that are issued in the procedure. However, procedural statements, such as variable assignments and control structures, do not generate events in a deterministic fashion. For example, the control structures are WHILE or IF.
Tuning data is captured only for certain kinds of SQL statements and not for non-SQL procedures. However, if a nested SQL procedure is called, data is captured for that procedure.
If no SQL procedure profiling data is captured, no report is generated.
To run a stored procedure with SQL procedure profiling: