Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAQ: A New Paradigm for Approximate Query Processing Navneet Potti Jignesh Patel VLDB 2015.

Similar presentations


Presentation on theme: "DAQ: A New Paradigm for Approximate Query Processing Navneet Potti Jignesh Patel VLDB 2015."— Presentation transcript:

1 DAQ: A New Paradigm for Approximate Query Processing Navneet Potti Jignesh Patel VLDB 2015

2 Outline Approximate Query Processing SAQ DAQ Bitwise DAQ Scheme Evaluation Conclusion 2

3 Approximate Query Processing Data volume is growing exponentially Data volume is growing exponentially Queries are interactive to support real-time decisions Decisions are resilient to small errors Quick Approximate Answer is better than Slow Exact Answer Quick Approximate Answer is better than Slow Exact Answer Exploratory analysis demands responsiveness eg: Average Revenue estimate $12M is about as good as $12,345,678 eg: Average Revenue estimate $12M is about as good as $12,345,678 3

4 SAQ Sampling-based Approximate Querying Run query on a small random subset of data Error in estimate presented as confidence interval Avg revenue = $12.3 ± 0.1 million with 95% confidence Can be “online” – error eventually shrinks to zero => exact estimate 4

5 Confidence Intervals Avg revenue = $12.3 ± 0.1 million with 95% confidence What does this mean? 12.312.4 12.2 95% Probability Distribution of Average Revenue With 95% probability, true average revenue lies in 12.3 ± 0.1 million With 5% probability, true average revenue lies outside 12.3 ± 0.1 million 5

6 Confidence Intervals eg: Avg revenue = $12.3 ± 0.1 million with 95% confidence How should we interpret the tails? 12.312.4 12.2 95% Probability Distribution of Average Revenue Tails occur 5% of the time. In Avg Regional Revenue for 100 states, 5 estimates are in the tails There is no bound on error in the tail. The Avg Revenue could be as small as $1M or as large as $100M 6

7 SAQ: Shortcomings 12.312.4 12.2 Semantics of the tails of confidence intervals are hard to interpret. Intervals are very broad for outlier aggregates like MAX or Top 100. Intervals are hard to manipulate. No closed algebra. 95% Confidence interval bounds are unintuitive Need to see more of the data to find outliers. Slow convergence. Is 100 ± 10 “greater than” 90 ± 20? How do we add these intervals? 7

8 Pop quiz! Estimate the sum. DAQ Deterministic Approximate Querying 5,321,656 + 3,151,709 + 1,362,296 _________________________ = ? ? ? ? ? a.Approximately 2.4 million? b.Approximately 9.7 million? c.Approximately 13.8 million? d.Approximately 17.0 million? a.Approximately 2.4 million? b.Approximately 9.7 million? c.Approximately 13.8 million? d.Approximately 17.0 million? = 9,???,??? = 9,7??,??? = 9,83?,??? 8

9 Use deterministic intervals instead of probabilistic (confidence) intervals Guaranteed upper and lower bounds Avg revenue = $12.3 ± 0.2 million Can be “online” – Error interval eventually becomes degenerate => exact estimate DAQ Deterministic Approximate Querying DAQ UI Mockup 9

10 SAQ vs DAQ (at a glance) SAQDAQ Complex semantics using confidence intervals due to the “tail”. Simple semantics using deterministic intervals as there is no “tail”. Slow for outlier aggregates like MAX or Top 100 and heavy-tailed data. Fast for outlier aggregates like MAX or Top 100 and heavy-tailed data. No closed algebra. No clear semantics for predicates and arithmetic operations on estimates. Closed relational algebra. Clear semantics for predicates and arithmetic ops using interval algebra. 10

11 Conceptual DAQ Scheme Hierarchically partition the attribute’s domain Estimates are represented as intervals [a,b] 11

12 Conceptual DAQ Scheme Hierarchically partition the attribute’s domain Estimates are represented as intervals [a,b] e.g., Count B-Tree 12

13 Interval Algebra Predicate evaluation Interval representation for relations Which cities have population > 100? Certainly > 100 Potentially > 100, 13

14 Formal Definition Interval estimates for attributes and relations Operators consume and produce intervals Closed relational algebra Online DAQ scheme – monotonically shrinking intervals – converges to exact estimate 14

15 Bitwise DAQ Scheme Similar to the decimal digit-wise sum example Uses Bitsliced Index representation 15

16 Bitwise DAQ Scheme 16 Use most significant m bits for evaluation Remaining n-m bits set to all-0 and all-1 for bounds Error bound decreases exponentially: 2 n-m

17 Bitwise DAQ Scheme Algorithms 17 Average aggregation upto m bits

18 Bitwise DAQ vs. Baseline 18 Exponentially decreasing error bounds in estimating Avg

19 Bitwise DAQ Scheme Algorithms 19 Less Than predicate upto m bits

20 Bitwise DAQ vs. Baseline 20 Predicate evaluation: 6x speedup using 8 bits for < 1% error

21 Bitwise DAQ vs. Baseline 21 Top 100: 3.5x speedup for < 1% error on Uniform, Zipf data

22 Bitwise DAQ vs. SAQ 22 Top 100: DAQ performs better for heavy-tailed data (Zipf)

23 Bitwise DAQ Summary 23 Excels at Predicates Outlier aggregates Heavy-tailed data Suffers for Simpler aggregates (sum, avg) Uniform data Compression improves performance further Can operate directly on compressed bitvectors > 8x speedup for Top 100 on Zipf data Embarrassingly parallelizable NUMA-aware parallelization

24 Future Work B-tree like indices Extension to other operators (Group By, Join) Extension to other data types Query optimization Combining SAQ and DAQ 24


Download ppt "DAQ: A New Paradigm for Approximate Query Processing Navneet Potti Jignesh Patel VLDB 2015."

Similar presentations


Ads by Google