Size Bounds and Query Plans for Relational Joins

被引:71
|
作者
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
关键词
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
相关论文
共 50 条
  • [21] Adaptively reordering joins during query execution
    Li, Quanzhong
    Shao, Minglong
    Markl, Volker
    Beyer, Kevin
    Colby, Latha
    Lohman, Guy
    [J]. 2007 IEEE 23RD INTERNATIONAL CONFERENCE ON DATA ENGINEERING, VOLS 1-3, 2007, : 1 - +
  • [22] ERGONOMICS FOR RELATIONAL QUERY LANGUAGES
    CORSON, Y
    [J]. TSI-TECHNIQUE ET SCIENCE INFORMATIQUES, 1983, 2 (05): : 329 - 339
  • [23] On the complexity of division and set joins in the relational algebra
    Leinders, Dirk
    Van den Bussche, Jan
    [J]. JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 2007, 73 (04) : 538 - 549
  • [24] Querying relational databases without explicit joins
    Lawrence, R
    Barker, K
    [J]. CONCEPTUAL MODELING FOR NEW INFORMATION SYSTEMS TECHNOLOGIES, 2002, 2465 : 278 - 291
  • [25] DYNAMIC QUERY EVALUATION PLANS
    GRAEFE, G
    WARD, K
    [J]. PROCEEDINGS OF THE 1989 ACM SIGMOD INTERNATIONAL CONFERENCE ON THE MANAGEMENT OF DATA, 1989, 18 : 358 - 366
  • [26] Deployment of Query Plans on Multicores
    Giceva, Jana
    Alonso, Gustavo
    Roscoe, Timothy
    Harris, Tim
    [J]. PROCEEDINGS OF THE VLDB ENDOWMENT, 2014, 8 (03): : 233 - 244
  • [27] Vague joins - An extension of the vague query system VQS
    Kung, J
    Palkoska, J
    [J]. NINTH INTERNATIONAL WORKSHOP ON DATABASE AND EXPERT SYSTEMS APPLICATIONS, PROCEEDINGS, 1998, : 997 - 1001
  • [28] Semantic query optimization for query plans of heterogeneous multidatabase systems
    Hsu, CN
    Knoblock, CA
    [J]. IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2000, 12 (06) : 959 - 978
  • [29] Query completeness, distinguishability and relational machines
    Torres, JMT
    [J]. MODELS, ALGEBRAS, AND PROOFS, 1999, 203 : 135 - 163
  • [30] TQL - A NESTED RELATIONAL QUERY LANGUAGE
    THOM, JA
    KENT, AJ
    SACKSDAVIS, R
    [J]. AUSTRALIAN COMPUTER JOURNAL, 1991, 23 (02): : 53 - 65