Using metrics

Use the information produced by QP metrics to identify:

When you have information on the queries that may be causing problems, you can tune the queries to increase efficiency.

For example, identifying and fine-tuning an expensive query may be more effective than tuning the cheaper ones in the same batch.

You can also identify the queries that are run most frequently, and fine-tune them to increase efficiency.

Turning on query metrics may involve extra I/O for every query executed, so there may be performance impact. However, also consider the benefits mentioned above. You may want to gather statistical information from monitoring tables instead of turning on metrics.

Both QP metrics and monitoring tables can be used to gather statistical information. However, you can use QP metrics instead of the monitoring tables to gather aggregated historical query information in a persistent catalog, rather than have transient information from the monitor tables.