Kbase 13220: Bracketing a multiple-component index client/server V6 v. V7
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Bracketing a multiple-component index client/server V6 v. V7
Index Bracketing (V7 and V6)
When a multiple-component index is used for record retrieval with
multiple range tests, the same bracketing logic applies in Version 7
and Version 6. That is: only the first range-tested component can be
bracketed. This can best be understood with an example:
fld1 fld2 fld3
A 1 M <-------------------------
A 1 P |
A 1 Z |
A 2 P * <--- | equality match
A 2 Z | | on fld1
A 3 M * | bracketed portion |
A 3 N * | of fld2 |
A 3 P * | |
A 3 Z <--- --------------------
B 1 M
B 1 Z
B 2 Z
B 3 M * indicates selected entry within
B 3 P bracketed portion
The index entries are sorted on fld3 only within each sorted value of fld2.
fld2. If we request records WHERE fld1 = "A" AND fld2 >= 2 AND
fld3 <= "P", the index is useful only as far as the first range test
(the bracketed portion of fld2). The remaining range test on fld3 is a
selection of index entries within the bracketed range.
The selection processing is done by the server in Version 7, which
does results in reduced network traffic. In Version 6, this selection
is performed by the client after all the records within the bracketed
range are sent to the client. Version 7 also decreases the network
traffic required by bundling multiple records in a network packet if
the -Mm can be changed to specify a packet size large enough to do so.
Any sorting required for the query will still be performed at the
client, but in Version 7, only the fields required to perform the sort
are sent over the network in the pre-sort phase. Once the sort order
is determined by the client process, the full records will be sent
over the network as needed, again bundling records in a message packet
if possible.
Notes: Multiple index usage (new V7 feature) cannot be utilized with
range comparisons, so it does not apply in this example. Also, the
order of the components in the query does not affect the bracketing
(i.e., WHERE fld3 <= "P" AND fld1 = "A" AND fld2 >= 2 will produce the
same results as the example above).
Progress Software Technical Support Note # 13220