Presentation is loading. Please wait.

Presentation is loading. Please wait.

On-line Index Selection for Physical Database Tuning Karl Schnaitter UCSC & Aster Data Advisor: Neoklis Polyzotis ISSDM Mentor: John Bent SRL/ISSDM Symposium.

Similar presentations


Presentation on theme: "On-line Index Selection for Physical Database Tuning Karl Schnaitter UCSC & Aster Data Advisor: Neoklis Polyzotis ISSDM Mentor: John Bent SRL/ISSDM Symposium."— Presentation transcript:

1 On-line Index Selection for Physical Database Tuning Karl Schnaitter UCSC & Aster Data Advisor: Neoklis Polyzotis ISSDM Mentor: John Bent SRL/ISSDM Symposium 2010

2 Index Tuning for Databases 2 Rab 5blue 10red 97green 10blue · · · Index Scan index(R(a)) Only accesses rows where a = 10 May be much faster than a table scan Rab 5blue 10red 97green 10blue · · · Table Scan Reads whole table Discards rows where a 10 Returns b from remaining rows SELECT b FROM R WHERE a = 10 · · · Execution Plan 1 Execution Plan 2

3 3 Introduction The index selection problem for databases: The goal is to choose the indexes that improve database performance A crucial part of performance tuning Index selection is very challenging Query benefit must be weighed against the cost of creation, maintenance and storage Dynamic query loads add more difficulty In practice, index selection is typically handled by an experienced database administrator

4 Previous Work 4 Auto-index tuning is an active research topic Hammer and Chan, SIGMOD 1976 Finkelstein et al., TODS 1988 Chaudhuri and Narasaya, VLDB 1997 Bruno and Chaudhuri, ICDE 2007 …and numerous other references

5 DBA Off-line Index Advisor Database Server What-if Optimizer Tuning Workload Recommended Indexes Create/Drop Indexes User Actual Workload +DBA controls index maintenance -DBA must know the workload in advance -Limited support for interactive tuning Off-line Tuning

6 On-line Tuning 6 DBA User On-line Index Advisor Database Server What-if Optimizer Actual Workload Create/Drop Indexes +Tuning is based on actual workload -DBA is out of the loop -Performance can become unpredictable

7 Our Proposal: Semi-automatic Tuning 7 DBA User Semi-automatic Index Advisor Database Server What-if Optimizer Create/Drop Indexes Actual Workload Recommended Indexes Feedback

8 Example Session 8 DBA User Database Server What-if Optimizer {a, b, c} Create/Drop Indexes Actual Workload I like a; I want d I dont like b {a, d, e, c} {a, f, c} Semi-automatic Index Advisor +DBA makes decisions on index-maintenance +Workload is analyzed online +DBA expertise is coupled with index advisor

9 Our Proposal: Semi-automatic Tuning 9 DBA User Semi-automatic Index Advisor Database Server What-if Optimizer Create/Drop Indexes Actual Workload Recommended Indexes Feedback

10 Generating Recommendations 10 candidate selection index candidates Work Function Algorithm recommended index set recommendation logic DBA User workload Work Function Algorithm (WFA) of Borodin & El Yaniv performance guarantees - exponential complexity

11 11 Example of Index Interaction Rab 5blue 10red 97green 10blue · · · Index Scan index(R(a)) Only accesses rows where a = 10 May be much faster than a table scan SELECT b FROM R WHERE a = 10 Execution Plan 1 Index-Only Scan index(R(a,b)) Only accesses index If plan 2 is cheaper, the index on R.a becomes obsolete Execution Plan 2

12 12 Interaction-Based Partitioning Consider an undirected graph Vertex for each candidate index Edge between interacting indexes Different components have independent benefits We call this a stable partition of the indexes

13 Improvement: Candidate Partitioning 13 candidate selection partitioned index candidates WFA recommended index set recommendation logic DBA User workload WFA Need to handle feedback

14 14 Feedback Model User provides votes for some indexes Positive votes for indexes they want Negative votes for indexes they dont want Votes may be explicit E.g., user may reject the systems recommendation to create an index Votes may also be implicit Creating an index casts a positive vote Dropping an index casts a negative vote

15 15 Handling Feedback Votes create a soft constraint on future recommendations Include indexes with positive votes Exclude indexes with negative votes Reverse these decisions if sufficient evidence is seen after the votes were cast

16 Final Solution: WFIT 16 candidate selection partitioned index candidates WFA recommended index set recommendation logic DBA feedback User workload WFA

17 17 Behavior of WFIT with Feedback Good votes follow the best indexes chosen off-line Bad votes are opposite of Good votes Normalized against optimal schedule

18 18 Conclusions Semi-automatic tuning is a promising new approach to physical database design Combines best features of existing approaches User feedback is the key ingredient We recommend indexes with provable performance guarantees Using work function algorithm as the foundation Future work may include: More efficient workload analysis A GUI frontend to present recommendations


Download ppt "On-line Index Selection for Physical Database Tuning Karl Schnaitter UCSC & Aster Data Advisor: Neoklis Polyzotis ISSDM Mentor: John Bent SRL/ISSDM Symposium."

Similar presentations


Ads by Google