Reusable open data paths with DB2® Multisystem

Reusable open data paths (ODPs) have special considerations for distributed queries. Like most other aspects of distributed queries, ODPs have two levels: distributed and local.

The distributed ODP is the coordinating ODP. A distributed ODP associates the query to the user and controls the local ODPs. Local ODPs are located on each system involved in the query, and they take requests through the distributed ODP.

Figure 1. Example of an ODP
Diagram of an Open Data Path (ODP). Your query is passed through the Distributed Coordinating ODP to be requested by the Local System ODP, System B ODP, and System C ODP.

For example, if a request is made to perform an SQL FETCH, the request is made against the distributed ODP. The system then takes that request and performs the appropriate record retrieval against the local ODPs.

With distributed queries, it is possible for the distributed ODP to be reusable, yet for one or more of the local ODPs to be nonreusable; however, if the distributed query ODP is nonreusable, the local ODPs are always nonreusable. This is allowed so that: The system tries to make the distributed ODP reusable whenever possible, even when an underlying local ODP is not reusable. If this occurs, the system handles the ODP refresh as follows:

The distributed ODP is reusable more often than local ODPs, because the distributed ODP is not affected by some of the things that make local ODPs nonreusable, such as a host variable in a LIKE clause or the optimizer choosing nonreusable so that an index-from-index create operation can be performed. The cases that would make distributed ODPs nonreusable are a subset of those that affect local ODPs. This subset includes the following items:

The reusability of the local ODP is affected by the same conditions that already exist for nondistributed query ODPs. Therefore, the same considerations apply to them as apply to local query ODPs.