Abstract
Evaluations of SQL queries with the ORDER BY clause is considered. The naive approach of first computing the result and then sorting the tuples is not suitable for Web applications, since the result could be very large while users expect to get quickly the top-k tuples. Tractability, in this case, amounts to enumerating answers in sorted order with polynomial delay, under query-and-data complexity. It is proved that an efficient algorithm for finding the top-ranked tuple of a conjunctive query is a sufficient (and not just necessary) condition for tractability. Several classes of orders are shown to have this property when queries are acyclic.
This research was supported by The Israel Science Foundation (Grant 893/05).
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Beeri, C., Fagin, R., Maier, D., Yannakakis, M.: On the desirability of acyclic database schemes. J. ACM 30(3), 479–513 (1983)
Bernstein, P.A., Goodman, N.: Power of natural semijoins. SIAM J. Comput. 10(4), 751–771 (1981)
Carey, M.J., Kossmann, D.: On saying “enough already!” in SQL. In: SIGMOD, pp. 219–230 (1997)
Carey, M.J., Kossmann, D.: Reducing the braking distance of an SQL query engine. In: VLDB, pp. 158–169 (1998)
Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational data bases. In: STOC, pp. 77–90 (1977)
Cohen, S., Sagiv, Y.: An incremental algorithm for computing ranked full disjunctions. In: PODS (2005)
Fagin, R.: Combining fuzzy information from multiple systems. J. Comput. Syst. Sci. 58(1), 83–99 (1999)
Fagin, R., Lotem, A., Naor, M.: Optimal aggregation algorithms for middleware. J. Comput. Syst. Sci. 66(4), 614–656 (2003)
Habich, D., Lehner, W., Hinneburg, A.: Optimizing multiple top-k queries over joins. In: SSDBM, pp. 195–204 (2005)
Hristidis, V., Koudas, N., Papakonstantinou, Y.: PREFER: A system for the efficient execution of multi-parametric ranked queries. In: SIGMOD (2001)
Ilyas, I.F., Aref, W.G., Elmagarmid, A.K.: Supporting top-k join queries in relational databases. In: VLDB, pp. 754–765 (2003)
Johnson, D.S., Yannakakis, M., Papadimitriou, C.H.: On generating all maximal independent sets. Information Processing Letters 27, 119–123 (1988)
Lawler, E.L.: A procedure for computing the k best solutions to discrete optimization problems and its application to the shortest path problem. Management Science 18, 401–405 (1972)
Natsev, A., Chang, Y.C., Smith, J.R., Li, C.S., Vitter, J.S.: Supporting incremental join queries on ranked inputs. In: VLDB, pp. 281–290 (2001)
Yannakakis, M.: Algorithms for acyclic database schemes. In: VLDB, pp. 82–94 (1981)
Yen, J.Y.: Another algorithm for finding the k shortest loopless network paths. In: Proc. 41st Mtg. Operations Research Society of America, vol. 20, p. B/185 (1972)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kimelfeld, B., Sagiv, Y. (2006). Incrementally Computing Ordered Answers of Acyclic Conjunctive Queries. In: Etzion, O., Kuflik, T., Motro, A. (eds) Next Generation Information Technologies and Systems. NGITS 2006. Lecture Notes in Computer Science, vol 4032. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11780991_13
Download citation
DOI: https://doi.org/10.1007/11780991_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-35472-7
Online ISBN: 978-3-540-35473-4
eBook Packages: Computer ScienceComputer Science (R0)