xUnderstanding the Efficiency of the Minimum Referenced Subtree
In any database structure consisting of more than a
single table or segment, WebFOCUS handles retrieval by only accessing
data from the minimum referenced subtree, which is a subset of the
full database structure. A minimum referenced subtree consists of
only those segments containing referenced fields, and any intervening
segments needed to make a complete structure.
Consider the following database structure consisting of three
segments, A, B, and C, with A being the parent of B, and B the parent
of C. Segment A is also known as the root segment. This structure
may be three different joined tables, or a single, multisegment structure.
If a database request references fields contained only in segment
A, then only data in segment A is retrieved. Likewise, if fields
from segments A and B are requested, only segments A and B are retrieved.
No additional retrieval costs are incurred, as would occur if all
three segments were retrieved for each request.
For joined structures, there is an implicit reference to the
root segment, which is always retrieved in a database request. If
a request involving a joined structure references fields from segment
B only, both segments A and B are retrieved since the root segment
(A) is implied to link segment B. Additionally, if fields from segment
C only are referenced, all three segments are retrieved since segments
A and B are implied to link segment C. The retrieval costs are higher
when intervening segments are retrieved for a request.
For multisegment structures, which are defined in the same Master
File, there is no implied reference to the root segment. If a request
involving this type of structure references fields from one segment
only, such as segment C, then one segment only, segment C, is retrieved.
However, if fields from segments A and C are referenced, then all
three segments are retrieved since segment B is an intervening segment
required to make a complete structure. When all possible database
relations are described in a single Master File, you can eliminate
the costs associated with retrieving non-referenced segments.