Sorting threads

You can sort threads by a specific performance counter (simple sort) or by using several performance counters (hierarchical sort).

In windows that list threads, the entries are sorted by a performance counter (simple sort). By default, this is the leftmost column in the window. To change the order, click the name of another column.

In the Thread Summary window, you can create a specific sort hierarchy. You can select up to five performance counters as sort criteria; the first one selected has the highest sort criterion. You can sort the rows in ascending or descending order. You can also view them in a different order for each Db2® subsystem.

To sort the threads, complete the following steps:

  1. Click View > Sort. The Sort window is displayed.
  2. In the Available columns pane, click the column name to be the highest sort criterion, and then click the Add icon (Add).

    The selected column name is removed from the Available columns pane and displayed in the Sort columns pane.

    You can continue selecting additional sort criteria until you have reached the limit of five column names. Your selection is always hierarchical. This means, the column name that you select first is the highest sort criterion, the one you select second is the second highest criterion, and so on. For example, if you select Plan as the highest sort key and there are several threads with the same Plan, you might want to sort these threads by another column name, such as Elapsed Class 2, and would thus select Elapsed Class 2 as second sort key.

  3. Within a sort criterion, the threads are, by default, sorted in ascending order. In the Sort columns pane, click the column name for which you want to specify descending order and then click Descending to sort the threads in descending order.
  4. You can use the Move Up and Move Down buttons to change the hierarchy of the sort criteria.
  5. At any time during or after your selection, you can remove a sort criterion from your selection. In the Sort columns pane, click the column name to be removed and then click the Remove button (Remove). The selected column name is removed from the Sort columns pane and displayed in the Available columns pane at its previous position.
  6. When you have finished specifying your sort criteria, click OK.

The Thread Summary window is displayed. The rows are sorted according to your specifications. The Sort icon (Sort) is displayed in the right-hand corner of the status bar to show that your sort criteria are active. The current sort criteria remain valid for this Db2 subsystem until you change them again or disable them.

If you want to keep your sort criteria but temporarily disable them to view the default order, right-click the Sort icon (Sort), and then click Disable. The Sort icon (Sort on) is dimmed, and the threads are displayed in the default order.

To reactivate your sort criteria, right-click the dimmed Sort icon (Sort), and then click Enable. The threads are re-sorted according to your custom specifications.