FORWISS
General Research Report
Implementation and
Optimization Issues of the
ROLAP Algebra
F. Ramsak, M.S. (UIUC)
Dr. V. Markl
Prof. R. Bayer, Ph.D.
© 1999 FORWISS
FORWISS
Contents
Motivation
ROLAP Algebra Recap
Optimization Issues
– Handling of Restrictions
– Aggregation Networks
Future Work & Summary
© 1999 FORWISS
TIME
FORWISS
All Time
Example DW Model
Year
Quarter
Month
Sales
Cost
Quantity
Co
nt
Pr
od
u
ct
Ca
te
go
Se
ct
Al
l
DU
CT
© 1999 FORWISS
ro
up
ne
r
es
pe
in
s
Bu
y
eT
pe
ad
Tr
t
Na
n
io
n
io
g
Re
Pr
od
PR
O
or
ry
G
ai
y
sT
uc
m
sto
ts
l
Al
er
Cu
TO
S
CU
M
ER
User‘s View of a Report
Sum - Sales
Region
Asia
Asia Total
Europe
Nation
China
Japan
France
Germany
Spain
Europe Total
Total
Year
Quarter
1998
1
2
1998 Total
3
FORWISS
Total
4
1
4
7
2
5
8
1
4
7
2
5
8
3
6
9
Grouping combinations used to fill pivot table:
(1){Y,Q,R,N}
(2){Y,Q,R}
(3) {Y,Q}
(4) {Y,R,N}
(5){Y,R}
(6){Y}
(7) {R,N}
(8) {R}
(9){} = ALL
© 1999 FORWISS
FORWISS
POT: Pivot Organized Tuples
POT ( R, G, F ) PAD h ( F ( g ( R)), ALL)
gG
hG
We may also write
(R)
G,F
© 1999 FORWISS
for POT(R,G,F).
FORWISS
POT-Example
POT(R,{{A},{A,B}},{sum(D)})
A B sum(D)
yields the table:
A
a1
…
B
ALL
ALL
Sum(D)
***
***
A B sum(D)
A B sum(D)
padA, B ( ALL )
padA, B ( ALL )
***
A B sum(D)
A sum(D)
an
a1
…
an
b1
…
…
a1
…
an
…
bm
…
bm
© 1999 FORWISS
***
***
***
***
***
***
***
sum ( D )
sum ( D )
A
A,B
R
FORWISS
POT Extension: Group Filtering
Filtering of generated groups
(like with the HAVING clause in SQL)
POT ( R, G, H , F )
PAD h ( H [ g ] ( F ( g ( R))), ALL)
gG
hG
with H containing a predicate H[g] for each
grouping g in G
© 1999 FORWISS
FORWISS
Group Filtering Example
Report Years, Product-Group sales totals and
sales/year for PGs with less than 10 Mio sales
POT ( Fact ,
{{Y },{PG},{Y , PG}},
{{}, {}, {sum( Sales ) 10 Mio}},
{sum( Sales )})
© 1999 FORWISS
FORWISS
Straight Forward SQL Generation
POT(R,{{A},{A,B}},{sum(D)}) maps directly to:
SELECT
A, ‘ALL’, sum(D)
FROM
R
UNION
SELECT
A, B, sum(D)
FROM
R
Disadvantages:
– Efficient execution depends on optimizer of underlying DBMS
– no UB-Tree support on SQL interface guaranteed
© 1999 FORWISS
FORWISS
Handling Restrictions
Semantic of ALL value
Year 1998( POT ( R,{{Year},{PG}}, F )) ?
Pushing Restrictions Down
– Pushing Through POT: Restrictions on all groups
( POT( R, G, F )) POT( ( R), G, F )
– Pushing down inside POT:
Restrictions on individual groups may be pushed down (i.e.,
before grouping) if they do not contain constraints on the
aggregation results
© 1999 FORWISS
(Year1997 Year1998 )CountryGermanyPr oductgroupCTV
FORWISS
pad Year , Month ( ALL )
pad Year , Month ( ALL )
sum ( Sales )
sum ( Sales )
Year
Year , Month
FACT
© 1999 FORWISS
FORWISS
pad Year , Month ( ALL )
pad Year , Month ( ALL )
sum ( Sales )
sum ( Sales )
Year
Year , Month
(Year1997 Year1998 )CountryGermanyPr oductgroupCTV
FACT
© 1999 FORWISS
FORWISS
Aggregation Networks
Efficient generation of multiple groups
– Usage of previous generated (more finer) groups instead of fact
table as starting point
– Only one access to the fact table for multiple groups
Problems: Size of aggregation nets
– Hierarchy semantic reduces aggregation nets significantly
UB-Tree & Tetris techniques have high potential to
optimize aggregation nets
– Grouping requires sorting
– Sorted writing of large temporary results saves additional
processing time
© 1999 FORWISS
()
Example of an
Aggregation
Network (Year)
(Year, Month)
(Month)
(Year, Productgroup)
(Year, Month, Productgroup)
© 1999 FORWISS
FORWISS
(Productgroup)
(Month, Productgroup)
FORWISS
()
Aggregation
Net with
Hierarchies (Year)
(Productgroup)
Sort according to PG
(or sorted writing+Scan)
(Year, Month)
(Year, Productgroup)
Tetris: sort according to Y
(Year, Month, Productgroup)
© 1999 FORWISS
POT and
Aggregation
Nets
pad Year , Month ( ALL )
FORWISS
pad Year , Month ( ALL )
sum ( Sales )
Year
sum ( Sales )
Year, Month
(Year1997 Year1998 )CountryGermanyPr oductgroupCTV
FACT
© 1999 FORWISS
FORWISS
Optimization Issues of
AggregationNets
Find minimal spanning tree for the specified
groupings
– Vertices: groupings
– Edge weights: cost of computing new group#
Cost factors:
– Group size
– Required sorting
– ...
© 1999 FORWISS
Optimization
Issues
of
Aggregation
Nets
FORWISS
()
C6
C7
(Year)
(Productgroup)
C4
C3
C5
(Year, Month)
(Year, Productgroup)
C1
C2
(Year, Month, Productgroup)
© 1999 FORWISS
FORWISS
Summary and Future Work
Aggregation networks have a very potential to
speed up POT operations
Standard grouping/aggregation algorithms may
benefit significantly from UB-Tree/Tetris techniques
Upon availability of resources: Implementation of
basic ROLAP algebra processing as part of a
master thesis
© 1999 FORWISS
© Copyright 2026 Paperzz