incrementally maintaining run-length encoded attributes in...

48
Incrementally Maintaining Run-length Encoded Attributes in Column Stores Abhijeet Mohapatra, Michael Genesereth

Upload: others

Post on 03-Mar-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in

Column Stores

Abhijeet Mohapatra, Michael Genesereth

Page 2: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

First Name Last Name State

Vincent Corleone NY

John Dillinger IL

Michael Corleone NY

Bonnie Parker IL

John Gotti NY

Clyde Barrow IL

Vito Corleone NY

Al Capone IL

Sonny Corleone NY

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

CrimeBosses

2

Page 3: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

First Name Last Name State

Al Capone IL

Bonnie Parker IL

Clyde Barrow IL

John Dillinger IL

John Gotti NY

Michael Corleone NY

Sonny Corleone NY

Vincent Corleone NY

Vito Corleone NY

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

sorted by State, First Name

3

Motivation Count Indexes ExtensionsResults

CrimeBosses

Page 4: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

State

IL

IL

IL

IL

NY

NY

NY

NY

NY

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

CrimeBossessorted by

State, First Nameand

verticallypartitioned

First Name

Al

Bonnie

Clyde

John

John

Michael

Sonny

Vincent

Vito

Last Name

Capone

Parker

Barrow

Dillinger

Gotti

Corleone

Corleone

Corleone

Corleone

=Runs exposed

4

Page 5: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Vertical Partitioning

SortingBetter Compression Faster Reads

RLEBitmap Encoding

Set of tuples Sequence of tuples

5

Motivation Count Indexes ExtensionsResults

Decompressionand Tuple Alignment

Page 6: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

6

State

IL

IL

IL

IL

NY

NY

NY

NY

NY

〈value, offset〉 〈value, count〉Value Offset

IL 4

NY 9

Value Count

IL 4

NY 5

Updates: fastLook Ups: slow

Updates: slowLook Ups: fast

Motivation Count Indexes ExtensionsResults

Page 7: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Choice of representation trades-off Look Up and Update costs.

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

7

n = number of runs in the sequencen = number of runs in the sequencen = number of runs in the sequence

RepresentationScheme

Cost of OperationCost of OperationRepresentationScheme Look Up Update

Count-based O(n) O(n)*

Offset-based O(log n) O(n)

* If offset is known at priori then O(1) time is required. Otherwise O(n) time is required.

Motivation Count Indexes ExtensionsResults

Page 8: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Workarounds: Amortize the cost of batch updates.

Key Idea: Differential store buffers the updates which are later merged using a table scan.

Pros: Spend O(k + n) time on k updates than one update.

Cons: Decompression and Re-compression overheads.

Update cost ∝ total number of tuples.

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

8

Motivation Count Indexes ExtensionsResults

Page 9: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Choice of representation trades-off Look Up and Update costs.

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

9

n = number of runs in the sequencen = number of runs in the sequencen = number of runs in the sequence

RepresentationScheme

Cost of OperationCost of OperationRepresentationScheme Look Up Update

Count-based O(n) O(n)

Offset-based O(log n) O(n)

Workarounds O(log n) k updates: O(k + n)

Motivation Count Indexes ExtensionsResults

Page 10: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

10

Motivation Count Indexes ExtensionsResults

How to optimally trade-off the update and the look up costs?

Input Sequence Output Sequenceincremental maintenance

Index Structureincremental maintenance

Our solutionIndex Structure

Page 11: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

11

Motivation Count Indexes ExtensionsResults

A count index is a tree over run lengths.

• Each node stores the sum of the values of its children.

• Leaf nodes store the run lengths.

• Root node stores the size of the sequence.

Page 12: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Count Indexes optimally trade-off the Look Up and Update costs.

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

n = number of runs in the sequencen = number of runs in the sequencen = number of runs in the sequence

RepresentationScheme

Cost of OperationCost of OperationRepresentationScheme Look Up Update

Count-based O(n) O(n)

Offset-based O(log n) O(n)

Workarounds O(log n) k updates: O(k + n)

Count Indexes O(log n)O(log n)

Count Indexes O(log n)k updates: O(k + log n)

12

Page 13: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

13

Input Sequence (n runs)

Output Sequenceupdate k runs: O(k + n) time

Count Index Count Indexupdate a sequence of k runs:

O(k + log n) time

update one run: O(log n) time

Our solution

Page 14: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Count Index over the sequence: a, a, b, b, b, a, a, a, b, b

2 3 3 2

5 5

10

a b a b

14

Page 15: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Suppose we want to look up the value at the 8th position in the sequence: a, a, b, b, b, a, a, a, b, b

2 3 3 2

5 5

10

a b a b

Key = 8Look Ups

15

Page 16: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

2 3 3 2

5 5

10 Key = 8

a b a b

The left child of root contains nodes up to the 5th position. Hence, search the right child for the offset (8 - 5) = 3.

Look Ups

16

Page 17: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

2 3 3 2

5 5

10

Key = 3

a b a b

The left child now contains nodes up to the 3rd position. Hence our answer lies in the left child.

Look Ups

17

Page 18: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

2 3 3 2

5 5

10

a b a b

Look Ups

18

Page 19: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

2 3 3 2

5 5

10

Time Complexity = O(h)

a b a b

h

Look Ups

19

Page 20: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Suppose we delete the first value (‘a’) and the last value ‘b’ in the sequence: a, a, b, b, b, a, a, a, b, b

2 3 3 2

5 5

10

a b a b

Deletions

20

Page 21: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 1: At each step we only update the count at each node.

1 3 3 1

5 5

10

a b a b

Deletions

21

Page 22: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 1: At each step we only update the count at each node.

1 3 3 1

4 4

10

a b a b

Deletions

22

Page 23: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 1: At each step we only update the count at each node.

1 3 3 1

4 4

8

a b a b

Deletions

23

Page 24: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Suppose we delete the last value ‘b’ from the sequence: a, b, b, b, a, a, a, b

1 3 3 1

4 4

8

a b a b

Deletions

24

Page 25: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If we delete a paired-up node that has no unpaired neighbors, we update the ancestors’ counts.

1 3 3

4 4

8

a b a

Deletions

25

Page 26: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If we delete a paired-up node that has no unpaired neighbors, we update the ancestors’ counts.

1 3 3

4 4

8

a b a

Deletions

26

Long branches may result from deletions

Page 27: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If we delete a paired-up node that has no unpaired neighbors, we update the ancestors’ counts.

1 3

4 3

8

a b

Deletions

3

a

27

Page 28: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If we delete a paired-up node that has no unpaired neighbors, we update the ancestors’ counts.

1 3

4 3

7

a b

Deletions

3

a

28

Page 29: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Suppose we delete the first value ‘a’ from the sequence: a, b, b, b, a, a, a

1 3

4 3

7

a b

Deletions

3

a

29

Page 30: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If the deleted node or its sibling has an unpaired neighbor, we pair up the sibling and the neighbor.

3

4 3

7

b

Deletions

3

a

30

Page 31: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If the deleted node or its sibling has an unpaired neighbor, we pair up the sibling and the neighbor.

Deletions

3

4 3

7

b

3

a

31

Page 32: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Case 2: If the deleted node or its sibling has an unpaired neighbor, we pair up the sibling and the neighbor.

Deletions

3 3

6

32

Page 33: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

At each level of the count index, we either delete a node, update its value or pair its sibling with a neighbor.

Therefore, time complexity of deletions = O(h) where h is the height of count index.

Deletions

33

Page 34: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Bulk Inserts

34

2 3 3 2

5 5

10

a b a b

Input sequence: a, a, b, b, b, a, a, a, b, bSuppose we want to insert: a, a, a, a, c, c at 6th position

Page 35: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Step 1: Build a count index over the k-run sequence to be inserted. This takes O(k) time.

Bulk Inserts

4 2

6

a c

h1

35

Page 36: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Step 2: Merge the count index from Step 1 with the count index.

Bulk Inserts

2 3 3 2

5 5

10

a b a b

4 2

6

a c

h1

h

36

Page 37: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Step 2: Merge the count index from Step 1 with the count index.

Bulk Inserts

2 3 3 2

5 5

10

a b a b

4 2

6

a c

37

Page 38: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Step 2: Merge the count index from Step 1 with the count index.

Bulk Inserts

2 3 3 2

5 5

10

a b a b

4 2

6

a c

38

Page 39: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Step 2: Merge the count index from Step 1 with the count index.

Bulk Inserts

2 3 3 2

5 5

11

a b a b

4 2

6

a c

5

39

Page 40: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Time Complexity of Inserting k runs = O(k + h - h1) = O(k + h)

Bulk Inserts

2 3 3 2

5 5

11

a b a b

4 2

6

a c

5

16

40

Page 41: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

41

1. Count Indexes are balanced i.e. height h = O(log n) where n is number of leaves.

2. Incrementally maintaining n runs takes Ω(log n) time. Hence count indexes are optimal.

Page 42: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

About 2/3rd of the nodes are paired-up at each level.

∴ Height h of the count index = O(log n).

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

x4 x5 x6x2 x3x1

42

Balancing Count Indexes

Operation over n runs Time

Look ups O(log n)

Inserting / Deleting a run O(log n)

Inserting a sequence of k runs O(k + log n)

x7

Page 43: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

43

1. Count Indexes are balanced i.e. height h = O(log n) where n is number of leaves.

2. Incrementally maintaining n runs takes Ω(log n) time. Hence count indexes are optimal.

Page 44: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

• To Bit-Map Encoded sequences

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

44

State

IL

IL

NY

NY

NY

NY

IL

IL

NY

Bitmap ‘IL’ : 110000110

2 4 2 1

6 3

9

1 0 1 0

Bitmap ‘NY’ : 001111001

2 4 2 1

6 3

9

0 1 0 1

few distinct valuesmultiple runs

Page 45: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

• To Block-Oriented Stores (fan-out > 2)

Deletions: Merge a half-filled node with its neighbor.

Insertions: Split a full node into two halves before inserting.

Motivation Count Indexes ExtensionsResults

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

151324

a, 7b, 6a, 3 c, 9b, 4a, 8 c, 4a, 7c, 4

Leaf node

Interior node

45

Page 46: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Motivation Count Indexes ExtensionsResults

Summary• Out-of-order updates degrade compression.

• In-place updates on a sequence with n runs require O(n) time.

• Workarounds amortize the cost of batch updates but need to decompress and re-compress the sequence.

• Count indexes can incrementally maintain and look up a sequence of n runs in O(log n) time (which is optimal).

46

Page 47: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Motivation Count Indexes ExtensionsResults

Thank You!

Page 48: Incrementally Maintaining Run-length Encoded Attributes in ...abhijeet/papers/abhijeetIDEAS12Slides.pdfCorleone = Runs exposed 4. Incrementally Maintaining Run-length Encoded Attributes

Incrementally Maintaining Run-length Encoded Attributes in Column Stores

Motivation Count Indexes ExtensionsResults

End of Presentation