Abstract
Producing optimal left-deep trees is known to be NP-complete for general join graphs and a quite complex cost function counting disk accesses for a special block-wise nested-loop join [2]. Independent of any cost function is the dynamic programming approach to join ordering. The number of alternatives this approach generates is known as well [5]. Further, it is known that for some cost functions — those fulfilling the ASI property [4] — the problem can be solved in polynomial time for acyclic query graph, i.e., tree queries [2, 3].
Unfortunately, some cost functions like sort merge could not be treated so far. We do so by a slight detour showing that this cost function (and others too) are optimized if and only if the sum of the intermediate result sizes is minimized. This validates the database folklore that minimizing intermediate result sizes is a good heuristic. Then we show that summarizing the intermediate result sizes has the ASI property. It further motivates us to restrict the subsequent investigations to this cost function called C out for which we show that the problem remains NP-complete in the general case.
Then, we concentrate on the main topic of the paper: the complexity of producing left-deep processing trees possibly containing cross products. Considering cross products is known to possibly result in cheaper plans
Preview
Unable to display preview. Download preview PDF.
References
Garey, J., Johnson, D.: Computers and Intractability: a Guide to the Theory of NP-Completeness. Freeman, San Francisco (1979)
Ibaraki, T., Kameda, T.: Optimal Nesting for computing n-Relational Joins. ACM. Trans. on Database Systems, 9(3) (1984) 482–502
Krishnamurthy, R., Boral, H., Zaniolo, C.: Optimization of Nonrecursive Queries. Proc. Int. Conf. Very Large Databases (VLDB), (1986), 128–137
Monma, C., Sidney, J.: Sequencing with Series-Parallel Precedence Constraints. Math. Oper. Res,. 4 (1979), 215–224
Ono, K., Lohman, G.: Measuring the Complexity of Join Enumeration in Query Optimization. Proc. Int. Conf. Very Large Databases (VLDB), (1990), 314–325
Selinger, P., Astrahan, M., Chamberlin, D., Lorie, R., Price, T.: Access Path Selection in a Relational Database Management System. Proc. Int. Conf. Management of Data (ACM SIGMOD), (1979), 23–34
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cluet, S., Moerkotte, G. (1995). On the complexity of generating optimal left-deep processing trees with cross products. In: Gottlob, G., Vardi, M.Y. (eds) Database Theory — ICDT '95. ICDT 1995. Lecture Notes in Computer Science, vol 893. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58907-4_6
Download citation
DOI: https://doi.org/10.1007/3-540-58907-4_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58907-5
Online ISBN: 978-3-540-49136-1
eBook Packages: Springer Book Archive