CA Bind Analyzer for DB2 for z/OSCA DetectorCA SQL-Ease for DB2 for z/OSCA Sysview Performance Management Option for DB2 for z/OSCA Database Detector for DB2 for z/OSCA Plan Analyzer for DB2 for z/OSCA Subsystem Analyzer for DB2 for z/OS
Issue/Introduction
While displaying SQL History in HTIDBSQL, the command SORT 5 D (TotalElapsed Time) didn't sort the data in descending order as expected. the statement with 205 minutes is listed after the statement with 24 minutes. The expectation is for the 205-minute statement to be listed first.
Environment
Release: Component: CIDB
Resolution
The sorting feature is normally using binary (raw) data. The HTIDBSQL request and few others are using formatted data. Because of formatting of the time interval field, there was an attempt to compare hundreds with tens of minutes and it causes that 24 minutes was higher than 205 minutes. It can be fixed by changing the formatting in requests HTIDBSQL and HTUDSQL. Change print format of STMT-ELAPSED field from ' MM:SS.TTTT' to 'H:MM:SS.TTT'. for HTIDBSQL and SUM(STMT-ELAPSED) field from ' MM:SS.TTTT' to 'H:MM:SS.TTT'. for request HTUDBSQL