This is because all tuples of LOCATION with the
same values in the Region and Area attributes will have the same prefix in the hsurrogate
value. Furthermore, since the foreign key loc_hsk exists in the fact table
we can group the fact table tuples according to the Area attribute without having to
join them with the LOCATION dimension table.
Lets see how this transformation affects the abstract plan shown in Figure 5(b) for
our example query of Figure 4. The hierarchical pregrouping transformation modi-
fies this initial plan by changing the grouping attributes and pushing both residual
join operations after the Group_Select operation. This is possible because grouping
is done on hierarchical attributes only (attributes Area and Month) that have a
corresponding encoded form in the h-surrogates found in the fact table (loc_hsk:
area, date_hsk:month). The residual join operations are modified so that each tuple
in the output of the Group_Select operation is joined with only one tuple from the
DATE dimension and one tuple from the LOCATION dimension. The resulting plan
is shown in Figure 8(b).
By exploiting the above properties of the h-surrogates the hierarchical pregrouping
transformation can achieve three different types of modifications to the proposed
abstract processing plan for star queries (Figure 5(a)):
1. It can eliminate a residual join operation completely.
Pages:
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304