
410 OnDemand SQL Performance Analysis Simplified on DB2 for i5/OS in V5R4
when the local selection contains AND or OR conditions and a single index does not contain
all the proper key columns or a single index cannot meet all of the conditions.
If you look at the query in Example 12-1, you see four local selection predicates and two
ORDER BY columns. Following the EVI guidelines, single key indexes are created with key
columns covering the equal predicates as shown in Example 12-3.
Example 12-3 EVIs for the one table query example
CREATE ENCODED VECTOR INDEX MySchema/ItemsEVI_Year
ON MySchema/Items ("YEAR");
CREATE ENCODED VECTOR INDEX MySche ...