Size Bounds and Query Plans for Relational Joins

被引:75
作者
Atserias, Albert [1 ]
Grohe, Martin [2 ]
Marx, Daniel [3 ]
机构
[1] Univ Politecn Cataluna, Barcelona, Spain
[2] Humboldt Univ, Berlin, Germany
[3] Budapest Univ Technol & Econ, Budapest, Hungary
来源
PROCEEDINGS OF THE 49TH ANNUAL IEEE SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE | 2008年
关键词
D O I
10.1109/FOCS.2008.43
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Relational joins are at the core of relational algebra, which in turn is the core of the standard database query language SQL As their evaluation is expensive and very often dominated by the output size, it is an important task for database query optimisers to compute estimates on the size of joins and to find good execution plans for sequences of joins. We study these problems from a theoretical perspective, both in the worst-case model, and in an average-case model where the database is chosen according to a known probability distribution. In the former case, our first key observation is that the worst-case size of a query is characterised by the fractional edge cover number of its underlying hypergraph, a combinatorial parameter previously known to provide an upper bound. We complete the picture by proving a matching lower bound, and by showing that there exist queries for which the join-project plan suggested by the fractional edge cover approach may be substantially better than any join plan that does not use intermediate projections. On the other hand, we show that in the average-case model, every join-project plan can be turned into a plan containing no projections in such a way that the expected time to evaluate the plan increases only by a constant factor independent of the size of the database. Not surprisingly, the key combinatorial parameter in this context is the maximum density of the underlying hypergraph. We show how to make effective use of this parameter to eliminate the projections.
引用
收藏
页码:739 / +
页数:2
相关论文
共 14 条
  • [1] Abiteboul S., 1995, Foundations of databases, V1st
  • [2] ALON N, 1992, PROBABILISTIC METHOD
  • [3] Atserias A., 2008, SIZE BOUNDS QUERY PL
  • [4] Chaudhuri S., 1998, Proceedings of the Seventeenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems. PODS 1998, P34, DOI 10.1145/275487.275492
  • [5] SOME INTERSECTION-THEOREMS FOR ORDERED SETS AND GRAPHS
    CHUNG, FRK
    GRAHAM, RL
    FRANKL, P
    SHEARER, JB
    [J]. JOURNAL OF COMBINATORIAL THEORY SERIES A, 1986, 43 (01) : 23 - 37
  • [6] Query evaluation via tree-decompositions
    Flum, J
    Frick, M
    Grohe, M
    [J]. JOURNAL OF THE ACM, 2002, 49 (06) : 716 - 752
  • [7] On the number of copies of one hypergraph in another
    Friedgut, E
    Kahn, J
    [J]. ISRAEL JOURNAL OF MATHEMATICS, 1998, 105 (1) : 251 - 256
  • [8] Garcia-Molina H., 1999, DATABASE SYSTEM IMPL
  • [9] GRAEFE G, 1993, ACM COMPUTING SURVEY, V25
  • [10] Constraint Solving via Fractional Edge Covers
    Grohe, Martin
    Marx, Daniel
    [J]. PROCEEDINGS OF THE SEVENTHEENTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, 2006, : 289 - 298