
Chapter 5. Analyzing SQL performance data using iSeries Navigator 157
5.6.1 A poor performing SQL statement
In this example, we have an SQL application which joins rows from a customer table and an
order table. The application takes about a minute to read order information for 50 customers.
The SQL statement being used in the application to retrieve the order information is shown in
Example 5-1.
Example 5-1 Join operation from Customer table and Order table
SELECT O . *
FROM ORDERS O , CUSTOMERS C
WHERE O . CUSTKEY = C . CUSTKEY
AND C . CUSTOMER = ?
We want to tune this query and improve its performance.
As the first step to any SQL performance analysis, ...