Total Sort Time


 
Snapshot Level
Database
Application

 
Logical Data Grouping
dbase
appl
stmt

 
Monitor Switch
Sort
Sort
Sort

Resettable

Yes

 

Event Type
Database
Connection
Statement

Logical Data Grouping
db_event
conn_event
stmt_event

 

Element Name
Element Type

total_sort_time
counter

 

Description:  The total elapsed time (in milliseconds) for all sorts that have been executed.

Usage:  At a database or application level, use this element with "Total Sorts" to calculate the average sort time, which can indicate whether or not sorting is an issue as far as performance is concerned.

At a statement level, use this element to identify statements that spend a lot of time sorting. These statements may benefit from additional tuning to reduce the sort time.

This count also includes sort time of temporary tables created during related operations. It provides information for one statement, one application, or all applications accessing one database.

When using data elements providing elapsed times, you should consider:

  1. Elapsed times are affected by system load, so the more processes you have running, the higher this elapsed time value.

  2. To calculate this data element at a database level, the database system monitor sums the application-level times. This can result in double counting elapsed times at a database level, since more than one application process can be running at the same time.

    To provide meaningful data from the database level, you should normalize the data to a lower level. For example:

     
     total sort time / total sorts
    

    provides information about the average elapsed time for each sort.