SELECT TO_CHAR (MIN (begin_time), 'MM.DD HH24:MI') BEGIN_TIME,

         TO_CHAR (MAX (end_time), 'MM.DD HH24:MI') END_TIME,

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Background Checkpoints Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Background Checkpoints/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'CR Blocks Created Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "CR Blocks Created/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'CR Undo Records Applied Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "CR Undo Records Applied/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Consistent Read Changes Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Consistent Read Changes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Consistent Read Gets Per Sec' THEN average

               END),

            'FM999,999,999,999.99')

            "Consistent Read Gets/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'DB Block Changes Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "DB Block Changes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'DB Block Gets Per Sec' THEN average END),

            'FM999,999,999,999.99')

            "DB Block Gets/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'DBWR Checkpoints Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "DBWR Checkpoints/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Host CPU Utilization (%)' THEN average

               END),

            'FM999,999,999.99')

            "Host CPU Utilization (%)",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'CPU Usage Per Sec' THEN average END),

            'FM999,999,999.99')

            "CPU Usage(cs)/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Database Time Per Sec' THEN average END),

            'FM999,999,999.99')

            "Database Time(cs)/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Response Time Per Txn' THEN average END),

            'FM999,999,999.99')

            "Response Time(cs)/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'SQL Service Response Time' THEN average

               END),

            'FM999,999,999.99')

            "SQL Service Response Time(cs)",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Disk Sort Per Sec' THEN average END),

            'FM999,999,999.99')

            "Disk Sort/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Enqueue Deadlocks Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Enqueue Deadlocks/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Enqueue Requests Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Enqueue Requests/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Enqueue Timeouts Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Enqueue Timeouts/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Enqueue Waits Per Sec' THEN average END),

            'FM999,999,999.99')

            "Enqueue Waits/Sec",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Executions Per Sec' THEN average END),

            'FM999,999,999.99')

            "Executions/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Full Index Scans Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Full Index Scans/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'GC CR Block Received Per Second' THEN average

               END),

            'FM999,999,999.99')

            "GC CR Block Received/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'GC Current Block Received Per Second' THEN average

               END),

            'FM999,999,999.99')

            "GC Current Block Received/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Hard Parse Count Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Hard Parse Count/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Branch Node Splits Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Branch Node Splits/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Leaf Node Splits Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Leaf Node Splits/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Logical Reads Per Sec' THEN average END),

            'FM999,999,999.99')

            "Logical Reads/Sec",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Logons Per Sec' THEN average END),

            'FM999,999,999.99')

            "Logons/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Long Table Scans Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Long Table Scans/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Network Traffic Volume Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Network Traffic(bytes)/Sec",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Open Cursors Per Sec' THEN average END),

            'FM999,999,999.99')

            "Open Cursors/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'PX downgraded 1 to 25% Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "PX downgraded 1 to 25%/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'PX downgraded 25 to 50% Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "PX downgraded 25 to 50%/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'PX downgraded 50 to 75% Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "PX downgraded 50 to 75%/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'PX downgraded 75 to 99% Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "PX downgraded 75 to 99%/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'PX operations not downgraded Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "PX operations not downgr./Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'PX downgraded to serial Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "PX downgraded to serial/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Parse Failure Count Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Parse Failure Count/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Read Bytes Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Read Bytes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Read IO Requests Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Read IO Requests/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Read Total Bytes Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Read Total Bytes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Read Total IO Requests Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Phy Read Total IO Requests/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Reads Direct Lobs Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Reads Direct Lobs/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Reads Direct Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Reads Direct/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Physical Reads Per Sec' THEN average END),

            'FM999,999,999.99')

            "Physical Reads/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Write Bytes Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Write Bytes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Write IO Requests Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Write IO Requests/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Write Total Bytes Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Write Total Bytes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Write Total IO Requests Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Phy Write Tot IO Requests/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Writes Direct Lobs Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Phy Writes Direct Lobs/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Writes Direct Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Physical Writes Direct/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Physical Writes Per Sec' THEN average END),

            'FM999,999,999.99')

            "Physical Writes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Recursive Calls Per Sec' THEN average END),

            'FM999,999,999.99')

            "Recursive Calls/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Redo Generated Per Sec' THEN average END),

            'FM999,999,999.99')

            "Redo Generated(bytes)/Sec",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Redo Writes Per Sec' THEN average END),

            'FM999,999,999.99')

            "Redo Writes/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Index Scans Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Total Index Scans/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Parse Count Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Total Parse Count/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Table Scans Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "Total Table Scans/Sec",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'User Calls Per Sec' THEN average END),

            'FM999,999,999.99')

            "User Calls/Sec",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'User Commits Per Sec' THEN average END),

            'FM999,999,999.99')

            "User Commits/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'User Rollback UndoRec Applied Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "User UndoRecord Applied/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'User Rollbacks Per Sec' THEN average END),

            'FM999,999,999.99')

            "User Rollbacks/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'User Transaction Per Sec' THEN average

               END),

            'FM999,999,999.99')

            "User Transaction/Sec",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Buffer Cache Hit Ratio' THEN average END),

            'FM999,999,999.99')

            "Buffer Cache Hit Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Cursor Cache Hit Ratio' THEN average END),

            'FM999,999,999.99')

            "Cursor Cache Hit Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Database CPU Time Ratio' THEN average END),

            'FM999,999,999.99')

            "Database CPU Time Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Database Wait Time Ratio' THEN average

               END),

            'FM999,999,999.99')

            "Database Wait Time Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Execute Without Parse Ratio' THEN average

               END),

            'FM999,999,999.99')

            "Execute Without Parse Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Library Cache Hit Ratio' THEN average END),

            'FM999,999,999.99')

            "Library Cache Hit Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Library Cache Miss Ratio' THEN average

               END),

            'FM999,999,999.99')

            "Library Cache Miss Ratio",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Row Cache Hit Ratio' THEN average END),

            'FM999,999,999.99')

            "Row Cache Hit Ratio",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Row Cache Miss Ratio' THEN average END),

            'FM999,999,999.99')

            "Row Cache Miss Ratio",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Shared Pool Free %' THEN average END),

            'FM999,999,999.99')

            "Shared Pool Free %",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Memory Sorts Ratio' THEN average END),

            'FM999,999,999.99')

            "Memory Sorts Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Redo Allocation Hit Ratio' THEN average

               END),

            'FM999,999,999.99')

            "Redo Allocation Hit Ratio",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Soft Parse Ratio' THEN average END),

            'FM999,999,999.99')

            "Soft Parse Ratio",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'User Calls Ratio' THEN average END),

            'FM999,999,999.99')

            "User Calls Ratio",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'User Commits Percentage' THEN average END),

            'FM999,999,999.99')

            "User Commits Percentage",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Session Limit %' THEN average END),

            'FM999,999,999.99')

            "Session Limit %",

         TO_CHAR (SUM (CASE metric_name WHEN 'User Limit %' THEN average END),

                  'FM999,999,999.99')

            "User Limit %",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Process Limit %' THEN average END),

            'FM999,999,999.99')

            "Process Limit %",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'PGA Cache Hit %' THEN average END),

            'FM999,999,999.99')

            "PGA Cache Hit %",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'User Rollbacks Percentage' THEN average

               END),

            'FM999,999,999.99')

            "User Rollbacks Percentage",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Current Logons Count' THEN average END),

            'FM999,999,999')

            "Current Logons Count",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Current OS Load' THEN average END),

            'FM999,999,999.99')

            "Current OS Load(# of Process)",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Current Open Cursors Count' THEN average

               END),

            'FM999,999,999')

            "Current Open Cursors Count",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Branch Node Splits Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Branch Node Splits/Txn",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'CPU Usage Per Txn' THEN average END),

            'FM999,999,999.99')

            "CPU Usage(cs)/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'CR Blocks Created Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "CR Blocks Created/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'CR Undo Records Applied Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "CR Undo Records Applied/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Consistent Read Changes Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Consistent Read Changes/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Consistent Read Gets Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Consistent Read Gets/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'DB Block Changes Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "DB Block Changes/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'DB Block Changes Per User Call' THEN average

               END),

            'FM999,999,999.99')

            "DB Block Changes/User Call",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'DB Block Gets Per Txn' THEN average END),

            'FM999,999,999,999.99')

            "DB Block Gets/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'DB Block Gets Per User Call' THEN average

               END),

            'FM999,999,999,999.99')

            "DB Block Gets/User Call",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Disk Sort Per Txn' THEN average END),

            'FM999,999,999.99')

            "Disk Sort/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Enqueue Deadlocks Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Enqueue Deadlocks/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Enqueue Requests Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Enqueue Requests/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Enqueue Timeouts Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Enqueue Timeouts/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Enqueue Waits Per Txn' THEN average END),

            'FM999,999,999.99')

            "Enqueue Waits/Txn",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Executions Per Txn' THEN average END),

            'FM999,999,999.99')

            "Executions/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Executions Per User Call' THEN average

               END),

            'FM999,999,999.99')

            "Executions/User Call",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Full Index Scans Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Full Index Scans/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'GC CR Block Received Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "GC CR Block Received/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'GC Current Block Received Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "GC Current Block Received/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Global Cache Average CR Get Time' THEN average

               END),

            'FM999,999,999.99')

            "Global Cache Avg CR Get Tm(cs)",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Global Cache Average Current Get Time' THEN average

               END),

            'FM999,999,999.99')

            "GlobalCache Avg Cur Get Tm(cs)",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Global Cache Blocks Corrupted' THEN average

               END),

            'FM999,999,999.99')

            "Global Cache Blocks Corrupted",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Global Cache Blocks Lost' THEN average

               END),

            'FM999,999,999.99')

            "Global Cache Blocks Lost",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Hard Parse Count Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Hard Parse Count/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Leaf Node Splits Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Leaf Node Splits/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Logical Reads Per Txn' THEN average END),

            'FM999,999,999.99')

            "Logical Reads/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Logical Reads Per User Call' THEN average

               END),

            'FM999,999,999.99')

            "Logical Reads/User Call",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Logons Per Txn' THEN average END),

            'FM999,999,999.99')

            "Logons/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Long Table Scans Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Long Table Scans/Txn",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Open Cursors Per Txn' THEN average END),

            'FM999,999,999.99')

            "Open Cursors/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Parse Failure Count Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Parse Failure Count/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Reads Direct Lobs Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Physical Reads Direct Lobs/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Reads Direct Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Physical Reads Direct/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Physical Reads Per Txn' THEN average END),

            'FM999,999,999.99')

            "Physical Reads/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Writes Direct Lobs Per  Txn' THEN average

               END),

            'FM999,999,999.99')

            "Phy Writes Direct Lobs/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Physical Writes Direct Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Physical Writes Direct/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Physical Writes Per Txn' THEN average END),

            'FM999,999,999.99')

            "Physical Writes/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Recursive Calls Per Txn' THEN average END),

            'FM999,999,999.99')

            "Recursive Calls/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name WHEN 'Redo Generated Per Txn' THEN average END),

            'FM999,999,999.99')

            "Redo Generated(bytes)/Txn",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Redo Writes Per Txn' THEN average END),

            'FM999,999,999.99')

            "Redo Writes/Txn",

         TO_CHAR (SUM (CASE metric_name WHEN 'Rows Per Sort' THEN average END),

                  'FM999,999,999.99')

            "Rows/Sort",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Index Scans Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Total Index Scans/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Parse Count Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Total Parse Count/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Sorts Per User Call' THEN average

               END),

            'FM999,999,999.99')

            "Total Sorts/User Call",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Table Scans Per Txn' THEN average

               END),

            'FM999,999,999.99')

            "Total Table Scans/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'Total Table Scans Per User Call' THEN average

               END),

            'FM999,999,999.99')

            "Total Table Scans/User Call",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'Txns Per Logon' THEN average END),

            'FM999,999,999.99')

            "Txns/Logon",

         TO_CHAR (

            SUM (CASE metric_name WHEN 'User Calls Per Txn' THEN average END),

            'FM999,999,999.99')

            "User Calls/Txn",

         TO_CHAR (

            SUM (

               CASE metric_name

                  WHEN 'User Rollback Undo Records Applied Per Txn'

                  THEN

                     average

               END),

            'FM999,999,999.99')

            "User Undo Records Applied/Txn"

    FROM DBA_HIST_SYSMETRIC_SUMMARY DHSS

   WHERE     DHSS.DBID = (select dbid from v$database) --변경

         AND DHSS.INSTANCE_NUMBER = (select  INSTANCE_NUMBER from v$instance)  --변경

         AND DHSS.SNAP_ID >= :3 + 1

         AND DHSS.SNAP_ID <= :4 + 1

GROUP BY snap_id

ORDER BY snap_id

블로그 이미지

운명을바꾸는자

IT와 함께 살아가는 삶

,