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 条
  • [41] On the Complexity of Query Result Diversification
    Deng, Ting
    Fan, Wenfei
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 2014, 39 (02):
  • [42] Quantum bounded query complexity
    Buhrman, H
    van Dam, W
    FOURTEENTH ANNUAL IEEE CONFERENCE ON COMPUTATIONAL COMPLEXITY, PROCEEDINGS, 1999, : 149 - 156
  • [43] The quantum query complexity of certification
    Ambainis, Andris
    Childs, Andrew M.
    le Gall, François
    Tani, Seiichiro
    Quantum Information and Computation, 2010, 10 (3-4): : 0181 - 0189
  • [44] On the Complexity of Query Result Diversification
    Deng, Ting
    Fan, Wenfei
    PROCEEDINGS OF THE VLDB ENDOWMENT, 2013, 6 (08): : 577 - 588
  • [45] QUANTUM CONDITIONAL QUERY COMPLEXITY
    Sardharwalla, Imdad S. B.
    Strelchuk, Sergii
    Jozsa, Richard
    QUANTUM INFORMATION & COMPUTATION, 2017, 17 (7-8) : 541 - 567
  • [46] Query complexity of tournament solutions
    Maiti, Arnab
    Dey, Palash
    THEORETICAL COMPUTER SCIENCE, 2024, 991
  • [47] The quantum query complexity of the determinant
    Doern, Sebastian
    Thierauf, Thomas
    INFORMATION PROCESSING LETTERS, 2009, 109 (06) : 325 - 328
  • [48] Quantum query complexity for qutrits
    Tamir, Boaz
    PHYSICAL REVIEW A, 2008, 77 (02):
  • [49] Comment on "Subquadratic Space-Complexity Digit-Serial Multipliers Over GF(2m) Using Generalized (a, b)-Way Karatsuba Algorithm"
    Lee, Chiou-Yng
    Meher, Pramod Kumar
    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS I-REGULAR PAPERS, 2016, 63 (08) : 1316 - 1319
  • [50] Query optimization
    Ioannidis, YE
    ACM COMPUTING SURVEYS, 1996, 28 (01) : 121 - 123