Ensuring that queries perform sufficiently
It is important to make sure that any individual queries that are included in your program are not slowing down the performance of your program.
Before you begin
Tip: Query tuning capabilities that can help you with this task, such as visual explain and statistics advisor, are available in IBM® Db2 Administration Foundation for z/OS® and IBM Db2 for z/OS Developer Extension.
Procedure
To ensure that queries perform sufficiently:
- Tune each query in your program by following the general tuning guidelines for how to write efficient queries. For more information, see Writing efficient SQL queries.
- If you suspect that a query is not as efficient as it could be, monitor its performance. You can use a number of different functions and techniques to monitor SQL performance, including the EXPLAIN statement.