Compositional Datalog on SQL: Relational Algebra of the Environment

21 points by philzook


scottatgalois

This is a neat gem. Have you tried benchmarking it?

In the past, we’ve played around with executing Datalog or (Datalog-style) queries via SQL, but as recursive SQL queries themselves.

One idea I haven’t had time to play with is coding it the way you have with explicit iteration is that it means you could try using the SQL engine’s statistics and planner to dynamically change query plans for queries w/ many relations in response to the shifting relation sizes over a long-running query.