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 条
  • [31] THE QUANTUM QUERY COMPLEXITY OF CERTIFICATION
    Ambainis, Andris
    Childs, Andrew M.
    Le Gall, Francois
    Tani, Seiichiro
    QUANTUM INFORMATION & COMPUTATION, 2010, 10 (3-4) : 181 - 189
  • [32] The Query Complexity of Witness Finding
    Akinori Kawachi
    Benjamin Rossman
    Osamu Watanabe
    Theory of Computing Systems, 2017, 61 : 305 - 321
  • [33] Query complexity of mastermind variants
    Berger, Aaron
    Chute, Christopher
    Stone, Matthew
    DISCRETE MATHEMATICS, 2018, 341 (03) : 665 - 671
  • [34] Query Complexity of Adversarial Attacks
    Gluch, Grzegorz
    Urbanke, Ruediger
    INTERNATIONAL CONFERENCE ON MACHINE LEARNING, VOL 139, 2021, 139
  • [35] Query Complexity of Tournament Solutions
    Dey, Palash
    THIRTY-FIRST AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2017, : 2992 - 2998
  • [36] Nonadaptive quantum query complexity
    Montanaro, Ashley
    INFORMATION PROCESSING LETTERS, 2010, 110 (24) : 1110 - 1113
  • [37] On Exact Quantum Query Complexity
    Montanaro, Ashley
    Jozsa, Richard
    Mitchison, Graeme
    ALGORITHMICA, 2015, 71 (04) : 775 - 796
  • [38] The Query Complexity of Witness Finding
    Kawachi, Akinori
    Rossman, Benjamin
    Watanabe, Osamu
    THEORY OF COMPUTING SYSTEMS, 2017, 61 (02) : 305 - 321
  • [39] THE QUERY COMPLEXITY OF LEARNING DFA
    BALCAZAR, JL
    DIAZ, J
    GAVALDA, R
    WATANABE, O
    NEW GENERATION COMPUTING, 1994, 12 (04) : 337 - 358
  • [40] On the Complexity of Query Result Diversification
    Deng, Ting
    Fan, Wenfei
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 2014, 39 (02):