Abstract
Datalog systems evaluate joins over arithmetic (in)equalities as a naive generate-and-test of Cartesian products. We exploit aggregates in a source-to-source transformation to reduce the size of Cartesian products and to improve performance. Our approach approximates the well-known propagation technique from Constraint Programming.
Experimental evaluation shows good run time speed-ups on a range of non-recursive as well as recursive programs. Furthermore, our technique improves upon the previously reported in the literature constraint magic set transformation approach.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley (1995)
Ashley-Rollman, M.P., De Rosa, M., Srinivasa, S.S., Pillai, P., Goldstein, S.C., Campbell, J.D.: Declarative Programming for Modular Robots. In: Workshop on Self-Reconfigurable Robots/Systems and Applications at IROS (2007)
Bravenboer, M., Smaragdakis, Y.: Exception Analysis and Points-To Analysis: Better Together. In: ISSTA, pp. 1–12 (2009)
Bravenboer, M., Smaragdakis, Y.: Strictly Declarative Specification of Sophisticated Points-To Analyses. In: OOPSLA, pp. 243–262 (2009)
Choi, C., Harvey, W., Lee, J., Stuckey, P.: Finite Domain Bounds Consistency Revisited. In: Sattar, A., Kang, B.-h. (eds.) AI 2006. LNCS (LNAI), vol. 4304, pp. 49–58. Springer, Heidelberg (2006)
Cui, B., Warren, D.S.: A System for Tabled Constraint Logic Programming. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 478–492. Springer, Heidelberg (2000)
Google’s Protocol Buffers, http://code.google.com/apis/protocolbuffers/
Lam, M.S., Whaley, J., Livshits, V.B., Martin, M.C., Avots, D., Carbin, M., Unkel, C.: Context-sensitive program analysis as database queries. In: PODS, pp. 1–12 (2005)
Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV system for knowledge representation and reasoning. ACM Trans. Comput. Logic 7(3), 499–562 (2006)
Li, N., Mitchell, J.C.: DATALOG with Constraints: A Foundation for Trust Management Languages. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 58–73. Springer, Heidelberg (2002)
LogicBlox, http://logicblox.com/
Loo, B.T., Condie, T., Garofalakis, M.N., Gay, D.E., Hellerstein, J.M., Maniatis, P., Ramakrishnan, R., Roscoe, T., Stoica, I.: Declarative networking: language, execution and optimization. In: SIGMOD, pp. 97–108 (2006)
Maier, D., Warren, D.S.: Computing with Logic: Logic Programming with Prolog. Benjamin/Cummings (1988)
Predictix, http://www.predictix.com/
Rosenwald, J.: SWI-Prolog Google’s Protocol Buffers library, http://www.swi-prolog.org/pldoc/package/protobufs.html
Semmle, http://semmle.com/
Sereni, D., Avgustinov, P., de Moor, O.: Adding magic to an optimising Datalog compiler. In: SIGMOD, pp. 553–565 (2008)
Stuckey, P.J., Sudarshan, S.: Compiling query constraints (extended abstract). In: PODS, pp. 56–67 (1994)
White, W., Demers, A., Koch, C., Gehrke, J., Rajagopalan, R.: Scaling games to epic proportions. In: SIGMOD, pp. 31–42 (2007)
Wielemaker, J.: SWI-Prolog 5.10 Reference Manual (April 2010), http://www.swi-prolog.org
Zook, D., Pasalic, E., Sarna-Starosta, B.: Typed Datalog. In: Gill, A., Swift, T. (eds.) PADL 2009. LNCS, vol. 5418, pp. 168–182. Springer, Heidelberg (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Campagna, D., Sarna-Starosta, B., Schrijvers, T. (2012). Optimizing Inequality Joins in Datalog with Approximated Constraint Propagation. In: Russo, C., Zhou, NF. (eds) Practical Aspects of Declarative Languages. PADL 2012. Lecture Notes in Computer Science, vol 7149. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-27694-1_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-27694-1_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-27693-4
Online ISBN: 978-3-642-27694-1
eBook Packages: Computer ScienceComputer Science (R0)