MSUs per day, one statement
Found at REWE digital on day one and corrected with a single SQL change.
UBS HAINER SQL QUALITY CONTROL · DB2 FOR Z/OS
SQL behavior, access paths, SQL errors and buffer pools share one history, so tuning decisions rest on weeks and months of recorded data, not a single moment.
Found at REWE digital on day one and corrected with a single SQL change.
Each statement is identified by a hash of its text, so the same statement is recognized on every execution and CPU and zIIP growth, wait times and access path changes read as trends.
Each buffer pool is linked to the tables, indexes and statements using it, so I/O pressure is traced to the workload that causes it.
The statements worth changing are visible without a query of their own. Built on Grafana, every dashboard accepts a freely chosen time interval and filtering by user, transaction, plan and program.
Index recommendations

Recommendations are published with the statements and tables behind them: missing indexes, indexes with more columns than the match columns in use, and unnecessary indexes still carrying insert activity.
Statement details

CPU, zIIP, elapsed time, I/O and wait times for one statement over the selected interval, with its access path history alongside. Outlier detection flags executions that depart from the pattern.
Tables with highest CPU consumption

Top tables by CPU and zIIP consumption, each expanding to the statements executed against them. Overviews for plans and packages attribute consumption to an application or a team.
Buffer pool overview

Hit ratios, page residency time, deferred writes and prefetch efficiency across buffer pools and group buffer pools, with issues flagged as warning, severe or critical and linked to the objects using each pool.
A statement holding a lock or waiting on synchronous I/O delays the transactions behind it. That delay is measured per statement, and buffer pools that drive high I/O and unstable response times are identified for tuning.
Software charges follow general-purpose CPU, while eligible work on zIIPs generally does not add to them. Consumption is attributed to the statement, table, plan and package, and statements with low zIIP usage relative to their general-purpose CPU usage are identified as candidates.
Cycles released by a corrected statement are available to the rest of the workload. Indexes that add insert cost without a read benefit are identified for removal.
Index recommendations and AI Query Analysis propose the change, not only the symptom: index definitions and SQL rewrites. A recommended index is simulated based on the historical workload to estimate the impact before it is created.
A statement that slowed after Db2 selected a different plan is identified as a change, not investigated as a new problem, because the access path history is retained.
Every figure comes from collected execution data for the customer’s own workload, so the effect of acting on a recommendation is stated in MSUs and elapsed time.
Collection
Gathers static and dynamic SQL statements and their runtime behavior. This data is the basis for all subsequent analysis.
Runs continuously with low performance impact.
Access paths
Determines and retains access paths, producing a history rather than a single current plan.
Use it to establish whether a CPU or zIIP increase coincided with an access path change.
Recommendations
Recommends new or modified indexes. Also runs standalone as a batch job, filtered by timestamp range, schema, filter factor threshold, CPU or elapsed time, writing results to a Db2 table.
Use it to review indexing for one application, schema or period on demand.
Simulation
Simulates recommended indexes against the recorded workload before any index is created.
Use it to quantify the saving and reject recommendations that cost more to maintain than they return.
Reliability
Captures SQL errors and warnings from Db2 performance traces in near real time, consolidated across subsystems, users, plans and programs, each with its full diagnostic context.
Use it for incident resolution and for evidence in audits and SLA reporting.
Memory and I/O
Analyzes buffer pool and group buffer pool metrics, flags issues by severity, and links each pool to the objects and statements using it. Based on BPA4Db2, the UBS Hainer z/OS buffer pool tuning tool, it recommends pool sizes, threshold settings and object reassignments in plain English and generates the ALTER statements.
Use it when response times are unstable or I/O activity is high.
Analysis
Customizable Grafana dashboards: cost rankings, recommendations, plan and package overviews, outlier detection and index usage, with AI analysis attached to the statements themselves.
The daily working surface for administrators and developers.
What it collects, where it stores it, and how it is presented.
| Platform | Db2 for z/OS |
|---|---|
| Scope of analysis | Static and dynamic SQL statements, access paths, indexes, SQL errors and warnings, buffer pools and group buffer pools |
| Metrics per statement | General-purpose CPU and zIIP consumption, elapsed time, I/O, and Class 3 wait times for locks, I/O and log |
| Statement identification | A hash of the statement text, which allows tracking across executions |
| Access path data | The Db2 EXPLAIN result is retained per statement, producing an access path history |
| Index functions | Recommendation, simulation before creation, verification of automatic proposals, and identification of indexes not worth keeping |
| Error data | SQL errors and warnings from Db2 performance traces, with correlation ID, connection type, plan, program, statement and SQLCA |
| Buffer pool data | Buffer pool and group buffer pool metrics: hit ratios, page residency time, deferred writes and prefetch efficiency, with issues flagged by severity, plus recommended pool sizes, threshold settings and object assignments with generated ALTER statements |
| Data storage | Db2 tables |
| User interface | Grafana dashboards, filterable by time interval, user, transaction, plan and program |
| Components | Seven: Data Collector, Explainer, Index Advisor, Virtual Workload, Error Detector, Buffer Pool Tuning (based on BPA4Db2), and Performance Insights with AI Analysis |
| Largest reported installation | Approximately 140 billion SQL executions per day across a 14-member data sharing group, with low performance impact |
Supported Db2 for z/OS and z/OS release levels and installation prerequisites are supplied by UBS Hainer on request.
AI QUERY ANALYSIS
An expensive statement arrives with a first-pass diagnosis already attached. AI Query Analysis correlates its runtime history with its access paths, table and index metadata and column statistics, then reports the likely performance problem in actionable terms.
The output is a structured first-pass analysis: what appears to be wrong, how urgent it is relative to the rest of the workload, and what to do next, including SQL rewrites and index changes.
Because it draws on recorded history rather than one execution, it distinguishes a statement that has always been expensive from one that became expensive after a plan change.
History, access paths and statistics are read together and reported as one explanation.
Next steps include concrete rewrites, not only a description of what is slow.
Each statement is placed in the context of the wider workload, so tuning work is ordered.
Developers and junior administrators receive the explanation with the recommendation, which makes the work reviewable.
ERROR DETECTOR
Db2 SQL errors are typically investigated one incident at a time, from whatever evidence remains in a log. The Error Detector monitors performance traces continuously and consolidates errors and warnings across subsystems, users, plans and programs into one view.
Each entry carries the context needed to diagnose it: user, correlation ID, connection type, plan, program, the statement and the SQLCA. Summary and detail data are stored in Db2 tables, so one record serves incident response, audits and SLA documentation.

MSUs per day for one statement at REWE digital, found on the first day of use.
Annual MSU growth at REWE digital, flat since adoption even as the business scales.
SQL executions per day at the largest installation, across a 14-member data sharing group.
“Employees are motivated to review CPU usage, assess SQL query performance, and optimize their work with SQL Quality Control.”
– Db2 Administrator, REWE digital GmbH
Insurers, banks, retailers, telecommunications providers and public administrations across Europe and North America.


















Recorded sessions and reference material on Db2 for z/OS SQL workload analysis, cost attribution and index tuning.
A demonstration applies SQL Quality Control to a customer Db2 for z/OS workload. Contact sales@ubs-hainer.com in Germany or sales@ubs-hainersoftware.com in the US.
Schedule a demoSQL QUALITY CONTROL FAQS