50 DB2 II: Performance Monitoring, Tuning and Capacity Planning Guide
• CPU_RATIO and IO_RATIO specify how much faster or slower the data
source CPU and IO_RATIO speed is compared with the federated
server CPU speed and I/O rates, respectively. A low ratio indicates that
the data source workstation CPU (I/O) is faster than the federated
server workstation CPU (I/O). For low ratios, the optimizer will consider
pushing down operations that are CPU (I/O) intensive to the data
source. A low ratio is a value that is less than 1.
• COMM_RATE specifies the speed of the communication network
between the data source and the federated server. A low
communication rate indicates slow network communication between
the federated server and the data source. Lower communication rates
encourage the query optimizer to reduce the number of messages and
amount of data sent to or from this data source. If the COMM_RATE
server option is set to a very small number, the optimizer produces a
query requiring minimal network traffic.
6. Remote SQL Generation relates to a set of steps that generate efficient SQL
statements based on the SQL dialect of the data source.
7. Code Generation (local query portions) is the final step during which the
compiler uses the access plan and the query graph model to create an
executable access plan, or section, for the local query portions. Information
about access plans for static SQL is stored in the system catalog tables.
When the package is executed, the database manager will use the
information stored in the system catalog tables to determine how to access
the data and provide results for the query.
3.3 Execution flow of a federated query
Very simply, the federated server distributes the query fragment assigned to each
data source to the corresponding wrappers, which in turn submits the query
fragment to the data source and retrieves the results. These steps are typical,
and can vary depending on how a specific source handles the concept of a
connection, whether the source accepts requests via a query language or
through some other API, what kind of result set cursors or iterators (if any) are
supported by a source, and so forth.
The typical process of distributing a query, executing it, and returning its results is
1. The federated server passes authorization information to the wrapper and
requests it to establish a connection to the data source.