Databases Reference
In-Depth Information
For example, suppose there are 100 cities; 10,000 customers, each with one
account; and 5000 accounts with an account number greater than 600.
Suppose also that all tuples are of size 1. Then the left side is equal to
10,000/100
150, compared with the right side of 5000, and
the semijoin method is cheaper.
+
5000/100
=
9.4.2 Query Processing in Heterogeneous DDBs
Query processing in heterogeneous DDBs is considerably more complex
than in homogeneous DDBs, for a number of reasons.
In Steps 2 and 3 in Section 9.4.1, a global query expressed on a
global schema now needs to be translated into the constructs of the
export schemas from which the global schema was derived.
·
In Step 4, the cost of processing local queries is likely to be different
for different local DBs, which considerably complicates the task of
defining a global cost model on which to base global query optimi-
zation of the global query. Moreover, the local cost models and local
DB statistics may not be available to the global query optimizer.
One way for the GQP to gather local cost information is to send
sample test queries to the local DBs. Another way is for it to monitor
the execution of actual local queries and maintain statistics about
their behavior.
·
Also in Step 4, different local DBs may support different data mod-
els. Thus, it may not be possible to translate the results of one local
subquery into the data model of a different local DB. Global query
plans need to take those limitations into account, and sites should be
sent only data they can translate. Different local DBs may also sup-
port different query languages and hence may have different query
processing capabilities. Thus, sites should be sent only subqueries
that they can process.
·
In Step 5, local subqueries expressed on the export schemas using
the query language of the CDM have to be translated into queries
expressed on the local schemas using the local query language.
·
The points in the third entry in this list also mean that some post-
processing of local subqueries may have to be undertaken by the
GQP to combine the results of the local subqueries. This is an
extra sixth step, which will occur after the five steps described in
Section 9.4.1.
·
Search WWH ::




Custom Search