Pruning data from UE tables

If you use the EVMON_FORMAT_UE_TO_TABLES procedure to extract data from UE tables, you can use the PRUNE_UE_TABLE option to remove data that you no longer need.

Before you begin

Before you can extract data from a UE table, you must have created, activated, and enabled data collection for an event monitor that writes to a UE table.

About this task

In addition to the performance advantages that UE tables offer, using UE tables as output for an event monitor lets you take advantage of the automatic pruning feature of the EVMON_FORMAT_UE_TO_TABLES procedure. When you use this procedure, any data that is extracted from the UE table and written to a regular table can be automatically removed from the UE table. This procedure makes it easier to manage a UE table. For example, assume that you want to use a unit of work event monitor to capture information to generate daily reports for accounting purposes, such as charging departments for CPU time that is used by an application or query. In that case, you might want to prune that data after producing the reports.


To extract and then prune data from a UE table:

Issue an SQL statement that calls the EVMON_FORMAT_UE_TO_TABLES procedure with the PRUNE_UE_TABLE option to extract data into a regular table.
For example, if you have a unit of work event monitor called TRACKWORK, you might create a statement such as the one that follows:
All event data is copied from the UE table to the UOW_EVENT_TRACKWORK and UOW_METRICS_TRACKWORK tables. In addition, all records that were copied are removed from the UE table.