Previous Topic: ParallelismNext Topic: DB2 Predicates


Predicates and SQL Tuning

To write efficient SQL statements and tune SQL statements, you need a basic understanding of how DB2 optimizes SQL statements and how it accesses your data.

When writing and tuning SQL statements, filter as much as possible as early as possible. The most expensive thing you can do is to travel from your application to DB2. Filter as close to the indexes and data as possible while processing in DB2.

Understand how to reduce repeat processing. The most efficient SQL statement is the statement that never executes. Do only what is necessary to complete the job.