Synopses for query optimization: A space-complexity perspective

被引:6
|
作者
Kaushik, R
Naughton, JF
Ramakrishnan, R
Chakravarthy, VT
机构
[1] Microsoft Res, Redmond, WA 98052 USA
[2] Univ Wisconsin, Dept Comp Sci, Madison, WI 53705 USA
[3] IBM India Res Lab, New Delhi 110016, India
来源
ACM TRANSACTIONS ON DATABASE SYSTEMS | 2005年 / 30卷 / 04期
关键词
theory; performance; cardinality estimation; histograms; sampling;
D O I
10.1145/1114244.1114251
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Database systems use precomputed synopses of data to estimate the cost of alternative plans during query optimization. A number of alternative synopsis structures have been proposed, but histograms are by far the most commonly used. While histograms have proved to be very effective in (cost estimation for) single-table selections, queries with joins have long been seen as a challenge; under a model where histograms are maintained for individual tables, a celebrated result of Ioannidis and Christodoulakis [1991] observes that errors propagate exponentially with the number of joins in a query. In this article, we make two main contributions. First, we study the space complexity of using synopses for query optimization from a novel information-theoretic perspective. In particular, we offer evidence in support of histograms for single-table selections, including an analysis over data distributions known to be common in practice, and illustrate their limitations for join queries. Second, for a broad class of common queries involving joins (specifically, all queries involving only key-foreign key joins) we show that the strategy of storing a small precomputed sample of the database yields probabilistic guarantees that are almost space-optimal, which is an important property if these samples are to be used as database statistics. This is the first such optimality result, to our knowledge, and suggests that precomputed samples might be an effective way to circumvent the error propagation problem for queries with key-foreign key joins. We support this result empirically through an experimental study that demonstrates the effectiveness of precomputed samples, and also shows the increasing difference in the effectiveness of samples versus multidimensional histograms as the number of joins in the query grows.
引用
收藏
页码:1102 / 1127
页数:26
相关论文
共 50 条
  • [1] Space Complexity Vs. Query Complexity
    Oded Lachish
    Ilan Newman
    Asaf Shapira
    computational complexity, 2008, 17 : 70 - 93
  • [2] Space complexity vs. query complexity
    Lachish, Oded
    Newman, Ilan
    Shapira, Asaf
    COMPUTATIONAL COMPLEXITY, 2008, 17 (01) : 70 - 93
  • [3] Space complexity vs. query complexity
    Lachish, Oded
    Newman, Ilan
    Shapira, Asaf
    APPROXIMATION, RANDOMIZATION AND COMBINATORIAL OPTIMIZATION: ALGORITHMS AND TECHNIQUES, 2006, 4110 : 426 - 437
  • [4] On the complexity of distributed query optimization
    Wang, CP
    Chen, MS
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 1996, 8 (04) : 650 - 662
  • [5] Common Subexpression Algorithms for Space-Complexity Reduction of Gaussian Normal Basis Multiplication
    Azarderakhsh, Reza
    Jao, David
    Lee, Hao
    IEEE TRANSACTIONS ON INFORMATION THEORY, 2015, 61 (05) : 2357 - 2369
  • [6] Join synopses for approximate query answering
    Acharya, S
    Gibbons, PB
    Poosala, V
    Ramaswamy, S
    SIGMOD RECORD, VOL 28, NO 2 - JUNE 1999: SIGMOD99: PROCEEDINGS OF THE 1999 ACM SIGMOD - INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA, 1999, : 275 - 286
  • [7] TuG Synopses for Approximate Query Answering
    Spiegel, Joshua
    Polyzotis, Neoklis
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 2009, 34 (01):
  • [8] Subquadratic Space-Complexity Parallel Systolic Multiplier Based on Karatsuba Algorithm and Block Recombination
    Lee, Chiou-Yng
    Chiou, Che Wun
    Lin, Jim-Min
    GENETIC AND EVOLUTIONARY COMPUTING, VOL II, 2016, 388 : 187 - 200
  • [9] Synopses for Efficient and Reliable Approximate Query Processing
    Liang, Xi
    ProQuest Dissertations and Theses Global, 2022,
  • [10] Randomized synopses for query assurance on data streams
    Yi, Ke
    Li, Feifei
    Hadjieleftheriou, Marios
    Kollios, George
    Srivastava, Divesh
    2008 IEEE 24TH INTERNATIONAL CONFERENCE ON DATA ENGINEERING, VOLS 1-3, 2008, : 416 - +