Indexable and non-indexable predicates

An indexable predicate can match index entries; predicates that cannot match index entries are said to be non-indexable.

Begin program-specific programming interface information.
To make your queries as efficient as possible, you can use indexable predicates in your queries and create suitable indexes on your tables. Indexable predicates allow the possible use of a matching index scan, which is often a very efficient access path.

Indexable predicates might or might not become matching predicates of an index; depending on the availability of indexes and the access path that DB2® chooses at bind time.

For example, if the employee table has an index on the column LASTNAME, the following predicate can be a matching predicate:

SELECT * FROM DSN8A10.EMP WHERE LASTNAME = 'SMITH';

In contrast, the following predicate cannot be a matching predicate, because it is not indexable.

SELECT * FROM DSN8A10.EMP WHERE SEX <> 'F';

End program-specific programming interface information.