COMPRESSED REPRESENTATIONS OF CONJUNCTIVE QUERY RESULTS
Paris Koutris University of Wisconsin-Madison
joint work with Shaleen Deep (UW-Madison)
MOTIVATION In many scenarios a data processing pipeline repeatedly - - PowerPoint PPT Presentation
C OMPRESSED R EPRESENTATIONS OF C ONJUNCTIVE Q UERY R ESULTS Paris Koutris University of Wisconsin-Madison joint work with Shaleen Deep (UW-Madison) MOTIVATION In many scenarios a data processing pipeline repeatedly accesses the result of a
joint work with Shaleen Deep (UW-Madison)
2
3
4
5
6
7
8
adorned view 𝑊𝜃 database D compressed representation
access requests compression time 𝑼𝑫 space 𝑻 answer time/delay
preprocessing
9
10
11
compression time space total answer time delay do nothing
𝑃(𝑂) 𝑃(𝑂) materialize + create index 𝑃(𝑂2/4) 𝑃(𝑂2/4) 𝑃(|𝑃𝑉𝑈|) * 𝑃(1)
𝑃(𝑂2/4) 𝑃 𝑂2/4 𝜐 𝑃(𝜐|𝑃𝑉𝑈|) 𝑃(𝜐) * OUT is the output of an access request
12
13
14
bound variables: 𝑊
>
free variables: 𝑊
?
15
16
17
F ∈E
18
F ∈E
F ∈E
19
20
21
22
I
the interval in the root node includes all valuations
I1 I2
at the next level, the interval of the parent is split into two smaller intervals
I3 I4 I5 I6
… … … we stop at log |𝐸| levels
23
I
I1 I2 I3 I4 I5 I6
… … …
1
24
25
26
AGM bound
27
28
29
30
x2 x1 x3 x2 x4 x3 x5 x4 x6 x5 x7 x6
31
Qf...f(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
x2 x1 | x3 | x2 x4 | x3 x5 | x4 x6 | x5 x7 | x6
this creates an index that given a value
32
x2 x1 | x3 | x2 x4 | x3 x5 | x4 x6 | x5 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
33
x1 x5 x6 x2 x4 x1 x5 x3 x2 x4 x7 x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
34
x1 x5 x6 x2 x4 |x1x5 x3 x2 | x4 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
A is marked with gray
35
x1 x5 x6 x2 x4 |x1x5 x3 x2 | x4 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
ρ= 1 ρ= 2 ρ = 2
fhw(decomposition) = maximum ρ over all bags fhw(Q) = minimum fhwover all tree decompositions of Q fhw(Q | C ) = minimum fhwover all C-connextree decompositions of Q
36
x1 x5 x6 x2 x4 |x1x5 x3 x2 | x4 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
δ=0 δ=1/6 δ=1/3
assign a number 𝜀(𝑢) to each bag such that we achieve delay |𝐸|h(i)when we traverse the bag
P
F uF −δ(t)α(V t b )
X
F
uF − δ(t)α(V t
b )
𝜍
+ (𝑢) = minimum quantity
δ=0
37
x1 x5 x6 x2 x4 |x1x5 x3 x2 | x4 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
δ=0 δ=1/6 δ=1/3
Qffbb(x2, x4, x1, x5) ← R1(x1, x2), R0
2(x2), R0 3(x4), R4(x4, x5), R0 5(x5)
ρ+(t) = (1 + 1) − 1/3 · 1 = 5/3
δ=0
38
x1 x5 x6 x2 x4 |x1x5 x3 x2 | x4 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
δ=1/3 ρ+=5/3 δ=1/6 ρ+=5/3 δ=0 ρ+=1
δ=0
fh δ-width = 5/3 δ-height = 1/2
39
40
x1 x5 x6 x2 x4 |x1x5 x3 x2 | x4 x7 | x6 Qbfffbbf(x1, . . . , x7) ← R1(x1, x2), R2(x2, x3), . . . , R6(x6, x7)
δ=1/3 ρ+=5/3 δ=1/6 ρ+=5/3 δ=0 ρ+=1 δ=0
fh δ-width = 5/3 δ-height = 1/2
41
42
P bf···fb
n
(x1, . . . , xn+1) ← R1(x1, x2), R2(x2, x3), . . . , Rn(xn, xn+1).
x1 xn+1 x2 xn | x1 xn+1 x3 xn-1 | x2 xn
… δ= log|D| τ ρ+= 2- log|D| τ δ= log|D| τ ρ+= 2- log|D| τ δ= 0
fh δ-width = 2 log|D| τ δ-height = bn/2c · log|D| τ
43
44
45
46
47