A predicate is an element of SQL that is used for search operations. These are specified in the WHERE
and the HAVING
clause. Every database has its own set of predicates, which are used to filter the table data. There are different types of predicates in DB2, and DB2 has its own way of evaluating them. Based on the cost and the efficiency of a predicate, we can classify them as follows:
In this recipe, we will discuss these predicates, and analyze their impact on query performance.