eG Monitoring
 

Measures reported by Db2DPFSortTest

Sorting represents organizing the rows in a table into the order of one or more of its columns, optionally eliminating duplicate entries. Sorting is required when:

  • No index exists to satisfy a requested ordering (for example a SELECT statement that uses the ORDER BY clause).
  • An index exists but sorting would be more efficient than using the index
  • An index is created.
  • An index is dropped, which causes index page numbers to be sorted.

Because queries often require sorted or grouped results, sorting is often required, and the proper configuration of the sort heap areas is crucial to good query performance.

This test helps the administrators to figure out whether/not the sort heap allocations are sufficient to facilitate efficient sorting.

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
Sort_heap_allocated Indicates the sum of sort heap space allocated for all sorts in this database partition. Pages Normal memory estimates do not include sort heap space. If excessive sorting is occurring, the extra memory used for the sort heap should be added to the base memory requirements for running the database manager. Generally, the larger the sort heap, the more efficient the sort. Appropriate use of indexes can reduce the amount of sorting required. You may use the information returned at the database manager level to help you tune the SHEAPTHRES configuration parameter. If the element value is greater than or equal to SHEAPTHRES, it means that the sorts are not getting the full sort heap as defined by the SORTHEAP parameter.
Avg_sort_heap_space_used Indicates the average sort heap space used by each sort. Pages If the SORTHEAP configuration parameter is substantially larger than the average sort heap used, you may be able to lower the value of this parameter.
Sort_rate Indicates the number of sort operations performed on this logical partition during the last measurement period. Sorts/Sec  
Pct_sort_overflow Indicates the percentage of sorts in this logical partition that had to overflow to disk. Percent Sort overflows are sorts that ran out of sort heap and may have required disk space for temporary storage. When a sort overflows, additional overhead will be incurred because the sort will require a merge phase and can potentially require more I/O, if data needs to be written to disk. If this percentage is high, you may want adjust the database configuration by increasing the value of sortheap.
Avg_sort_time Indicates the average sort time for all sorts performed by all applications connected to this logical partition. Seconds A high value indicates the poor performance of sorting operations. Identify the statements that spend lot of time sorting. You may want to reduce the average sort time for these statements by increasing the sortheap parameter.