Optimization with DB2® Multisystem: Overview

Distributed queries are optimized at the distributed level and the local level.

  • Optimization at the distributed level focuses on dividing the query into the most efficient steps and determining which nodes process those steps. The distributed optimizer is distinctive to distributed queries. The distributed optimizer is discussed in this topic.
  • Optimization at the local (step) level is the same optimization that occurs in a nondistributed environment; it is the optimizer with which you are probably familiar. Local-level optimization is discussed minimally in this topic.

A basic assumption of distributed optimization is that the number of records stored at each data node is approximately equal and that all of the systems of the distributed query are of similar configurations. The decisions made by the distributed optimizer are based on the system and the data statistics of the coordinator node system.

If a distributed query requires more than one step, a temporary result file is used. A temporary result file is a system-created temporary file (stored in library QRECOVERY) that is used to contain the results of a particular query step. The contents of the temporary result file are used as input to the next query step.