O'Reilly logo

DB2 SQL Tuning Tips for z/OS Developers by Tony Andrews

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Initial Steps in Tuning a Query

Developers commonly face the problem of having a program or SQL statement that should be running faster. Many time, they’re not sure exactly where to start fixing this problem. Following is a list of steps to follow in order to find the issue and improve the performance:

1. Check the predicates. Whether it is one query or multiple queries in a program, check every predicate in every query to ensure that they are indexable, stage 1, and as simple and straightforward as possible.

2. If there is a Distinct or Group By in the query, make sure it is needed and then look at the Explain to see if it is causing a sort to take place. If the Distinct or Group By is needed, maybe there is another way to rewrite ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required