
416 OnDemand SQL Performance Analysis Simplified on DB2 for i5/OS in V5R4
Figure 12-4 shows an SQL statement that selects all orders with an order quantity greater
than 50. The QUANTITY column is defined with a scale of 2. In the WHERE clause, we used
a scale of 4. We executed the query twice. The first time we specified a logical file in order to
cause the query to use CQE. The second time we specified the table and the query was
executed by SQE.
Figure 12-4 Row selection using a different numeric data type in the where clause
With SQE, an index can be used, while with CQE, because of the differing scales, no suitable
index can be found and a ...