120
Adaptive Indexing in Modern Databases Stratos Idreos, Stefan Manegold and Goetz Graefe CWI, Amsterdam HP Labs, Palo Alto * * * + +

Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Adaptive Indexingin Modern Databases

Stratos Idreos, Stefan Manegold and Goetz Graefe

CWI, Amsterdam HP Labs, Palo Alto

* *

* +

+

Page 2: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tutorial PlanPart IIntroduction and db cracking basics (Stratos)Adaptive merging (Goetz)Benchmarking and hybrids (Stefan)

Part IIStochastic cracking and sideways cracking (Stratos)Concurrency control (Goetz)Partial cracking and updates (Stefan)

Page 3: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Introduction and db cracking basics

CIDR2007, Database CrackingStratos Idreos, Martin Kersten and Stefan Manegold

Page 4: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical design problem

which indexes to build?on which data parts?and when to build them?

Database systems perform efficiently only after proper tuning...

DBA without adaptive indexing

Page 5: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical Design

Sample Workload

Timeline

Page 6: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical Design

Sample Workload

Analyze Performance

Timeline

Page 7: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical Design

Sample Workload

Analyze Performance

Prepare Estimated physical design

Timeline

Page 8: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical Design

Sample Workload

Analyze Performance

Prepare Estimated physical design

Timeline

Queries

Page 9: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical Design

Sample Workload

Analyze Performance

Prepare Estimated physical design

Timeline

Queries

Complex and time consuming process

Page 10: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Physical Design

Sample Workload

Analyze Performance

Prepare Estimated physical design

Timeline

Queries

Complex and time consuming process

? Dynamic Workloads

Very Large Databases?

Page 11: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Dynamic environments

idle time workload knowledge

Page 12: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Dynamic environments

idle time workload knowledge

some problem cases

Page 13: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Dynamic environments

idle time workload knowledge

• Not enough idle time to finish proper tuningsome problem cases

Page 14: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Dynamic environments

• By the time we finish tuning, the workload changes

idle time workload knowledge

• Not enough idle time to finish proper tuningsome problem cases

Page 15: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Dynamic environments

• By the time we finish tuning, the workload changes• No index support during tuning

idle time workload knowledge

• Not enough idle time to finish proper tuningsome problem cases

Page 16: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Dynamic environments

• By the time we finish tuning, the workload changes• No index support during tuning

• Not all data parts are equally useful

idle time workload knowledge

• Not enough idle time to finish proper tuningsome problem cases

Page 17: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Adaptive Indexing

Remove all tuning, physical design steps but still get similar performance as a fully tuned system

How? Design new auto-tuning kernels

(operators, plans, structures, etc.)

For dynamic environments:

DBA with adaptive indexing

Page 18: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Adaptive Indexingno monitoringno preparation

no human involvement

no external tools

no full indexes

Page 19: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Adaptive Indexingno monitoringno preparation

no human involvement

no external tools

Continuous on-the-fly physical reorganization

no full indexes

Page 20: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Adaptive Indexingno monitoringno preparation

no human involvement

no external tools

Continuous on-the-fly physical reorganization

no full indexes

partial, incremental, adaptive indexing

Page 21: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleDatabase Cracking CIDR 2007

Each query is treated as an advice on how data should be stored

Page 22: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleDatabase Cracking CIDR 2007

Each query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Page 23: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleDatabase Cracking CIDR 2007

Each query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Page 24: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 25: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 26: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 27: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 28: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 29: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 30: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Database Cracking CIDR 2007

Page 31: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Resu

lt tu

ples

Database Cracking CIDR 2007

Page 32: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42Gain knowledge

on how data is organized

Physically reorganize based on the selection predicate

Resu

lt tu

ples

Database Cracking CIDR 2007

Page 33: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42Gain knowledge

on how data is organized

Dynamically/on-the-fly within the select-operator

Physically reorganize based on the selection predicate

Resu

lt tu

ples

Database Cracking CIDR 2007

Page 34: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 35: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 36: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 37: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 38: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 39: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 40: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 41: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 42: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 43: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

Physically reorganize based on the selection predicate

Resu

lt tu

ples

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 44: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

from Rwhere R.A > 10

and R.A < 14

select *

Q2:select *from Rwhere R.A > 7

and R.A <= 16

Q1:136798131211141619 Piece 5: 16 < A

Piece 3: 10 < A < 14

Piece 1: A <= 7

Piece 2: 7 < A <= 10

Piece 4: 14 <= A <= 16

Cracker column of A Cracker column of A

10 < A < 14

14 <= A

A <= 10Piece 1:

Piece 3:

Piece 2:

(in!place)(copy)

Q1 Q2

Column A

13164921271193141186

49271386131211161914

42

The more we crack, the more

we learn

Physically reorganize based on the selection predicate

Resu

lt tu

ples

Dynamically/on-the-fly within the select-operator

Database Cracking CIDR 2007

Page 45: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 46: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 47: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 48: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 49: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 50: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 51: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 52: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking a column

5 20 40 60 90 120

cracker array A

existing cracks

All values after this position are bigger than 5

new select: 15<A<105

5 20 40 60 90 12015 105

after cracking

Database Cracking CIDR 2007

Page 53: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Challenge: Efficiently refine index

Goal: Lightweight adaptation

index is refined as part of query processing

the select operator answers the query and refines the index in one go

Page 54: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

Page 55: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

select(A,v1-v2)A

Page 56: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

select(A,v1-v2)A

scan and materialize result

Page 57: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

select(A,v1-v2)A

scan and materialize result

more operators

Page 58: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

select(A,v1-v2)A

scan and materialize result

more operators

crackselect(A,v1-v2)

A

Page 59: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

select(A,v1-v2)A

scan and materialize result

more operators

crackselect(A,v1-v2)

A no need to materialize

Page 60: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

EngineeringDatabase Cracking CIDR 2007

Exploit column-store bulk processing

select(A,v1-v2)A

scan and materialize result

more operators

crackselect(A,v1-v2)

A no need to materialize

more operators

Page 61: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

100K random selections random selectivityrandom value rangesin a 10 million integer column

Database Cracking CIDR 2007

set-upScan

Full Index

Crack

0.001

0.01

0.1

1

10

100

1000

1 10 100 1000 10000 100000

Resp

onse

tim

e (

secs

)

Query sequence (x1000)

Page 62: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

100K random selections random selectivityrandom value rangesin a 10 million integer column

almost no initialization overhead

Database Cracking CIDR 2007

set-upScan

Full Index

Crack

0.001

0.01

0.1

1

10

100

1000

1 10 100 1000 10000 100000

Resp

onse

tim

e (

secs

)

Query sequence (x1000)

Page 63: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

100K random selections random selectivityrandom value rangesin a 10 million integer column

almost no initialization overhead

continuous improvement

Database Cracking CIDR 2007

set-upScan

Full Index

Crack

0.001

0.01

0.1

1

10

100

1000

1 10 100 1000 10000 100000

Resp

onse

tim

e (

secs

)

Query sequence (x1000)

Page 64: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

100K random selections random selectivityrandom value rangesin a 10 million integer column

almost no initialization overhead

continuous improvement

Database Cracking CIDR 2007

set-upScan

Full Index

Crack

0.001

0.01

0.1

1

10

100

1000

1 10 100 1000 10000 100000

Resp

onse

tim

e (

secs

)

Query sequence (x1000)

Page 65: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

10K random selections selectivity 10%random value rangesin a 30 million integer column

Database Cracking CIDR 2007

set-up

0.004

200

0.001

0.01

0.1

1

10

100

1 10 100 1000 10000

Cum

ula

tive a

vera

ge r

esp

onse

tim

e (

secs

)

Query sequence

Scan

Full Index

Crack

Page 66: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Cracking ExampleEach query is treated as an advice on how data should be stored

10K random selections selectivity 10%random value rangesin a 30 million integer column

10K queries later, Full Index still has not

amortized the initialization costs

Database Cracking CIDR 2007

set-up

0.004

200

0.001

0.01

0.1

1

10

100

1 10 100 1000 10000

Cum

ula

tive a

vera

ge r

esp

onse

tim

e (

secs

)

Query sequence

Scan

Full Index

Crack

Page 67: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Skyserver experiments

By the time stochastic cracking answered 160.000 queriesfull indexing (sorting) is still half way creating the index

Stochastic Cracking, PVLDB 12

4T Skyserver instancereal workload queries on PhotoObjAllPhotoObjAll = 500 million tuples

Page 68: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Literature

Page 69: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

LiteratureCIDR’05, first sketch

CIDR’07, initial architecture

SIGMOD’07, updates

SIGMOD’09, tuple reconstruction

PhDThesis’10

TPCTC’10, benchmarking

EDBT’10, adaptive merging

PVLDB’11, hybrids

PVLDB‘12a, robustness

PVLDB‘12b, concurrency control

Page 70: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Base Data

Page 71: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...

A B C DTable 1

A B C DTable 2

Base Data

Page 72: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 73: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 74: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 75: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 76: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 77: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 78: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 79: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 80: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

A B C DTable 1

A B C DTable 2

Base Data

Page 81: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexingA B C D

Table 1

A B C DTable 2

Base Data

Page 82: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexingA B C D

Table 1

A B C DTable 2

Base Data

Page 83: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 84: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 85: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 86: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 87: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 88: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 89: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 90: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 91: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 92: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 93: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 94: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 95: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

x

Page 96: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

xx

Page 97: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

x

xx

Page 98: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 99: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 100: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

A B C DTable 1

A B C DTable 2

Base Data

Page 101: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

A B C DTable 1

A B C DTable 2

Base Data

Page 102: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Page 103: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Page 104: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Page 105: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Page 106: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Sort, cluster in caches

Page 107: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Sort, cluster in caches

Page 108: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Sort, cluster in caches

Page 109: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Sort, cluster in caches

Crack joins

Page 110: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tangram

A B C DTable 1

A B C DTable 2

As queries arrive...Partial materialization

Partial indexing

Continuous adaptation

Storage adaptation

No tuple reconstruction

Adaptive Alignment

A B C DTable 1

A B C DTable 2

Base Data

Sort, cluster in caches

Crack joins

Page 111: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Related Work Auto-tuning tools

On-line tuning

Offline analysis and physical design.

Online analysis. Combine scans with index build.

Surajit Chaudhuri, Vivek Narassaya, Nico Bruno, Guy Lohman, Daniel Zilio, Anastassia Ailamaki, Alkis Polyzotis, Sam Lightstone,

Kai-Uwe Sattler, Karl Schnaitter ... and many more

Page 112: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Related Work Auto-tuning tools

On-line tuning

Offline analysis and physical design.

Online analysis. Combine scans with index build.

Surajit Chaudhuri, Vivek Narassaya, Nico Bruno, Guy Lohman, Daniel Zilio, Anastassia Ailamaki, Alkis Polyzotis, Sam Lightstone,

Kai-Uwe Sattler, Karl Schnaitter ... and many more

Adaptive Indexing pushes partial, incremental, adaptive, online indexing inside

the kernel

Page 113: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Indexing Overviewworkload analysis

index buildingquery processing

offline indexing

Page 114: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Indexing Overviewworkload analysis

index buildingquery processing

offline indexing

online indexingworkload analysis

index buildingquery processing

Page 115: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Indexing Overviewworkload analysis

index buildingquery processing

offline indexing

online indexing

adaptive indexing

workload analysisindex building

query processing

adaptive indexing

Page 116: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Indexing Overviewworkload analysis

index buildingquery processing

offline indexing

online indexing

adaptive indexing

workload analysisindex building

query processing

adaptive indexing

wor

kloa

d kn

owle

dge

idle time

adaptive

online

offline

Page 117: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

So what’s next...Is adaptive indexing the ultimate solution?Should we throw auto-tuning tools away? NO

Page 118: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

So what’s next...Is adaptive indexing the ultimate solution?Should we throw auto-tuning tools away? NO

SIGMOD2012, PHDw, Holistic IndexingEleni Petraki and Stratos Idreos

Page 119: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

So what’s next...Is adaptive indexing the ultimate solution?Should we throw auto-tuning tools away?

But AI may be the missing link

NO

adaptive indexing offline analysis online analysis

A system that continuously adapts and exploits both online and offline statistics as well as any a priori or online idle time

and its tuning/alert actions do not slow down queries

SIGMOD2012, PHDw, Holistic IndexingEleni Petraki and Stratos Idreos

Page 120: Adaptive Indexing in Modern Databases - planet-data.eu · Adaptive Indexing Remove all tuning, physical design steps but still get similar performance as a fully tuned system How?

Tutorial PlanPart IIntroduction and db cracking basics (Stratos)Adaptive merging (Goetz)Benchmarking and hybrids (Stefan)

Part IIStochastic cracking and sideways cracking (Stratos)Concurrency control (Goetz)Partial cracking and updates (Stefan)