Adding Magic to an Optimising Datalog Compiler
Summary: Magic-sets added to a fully automatic Datalog-to-SQL optimiser with no DB optimiser support. An abstract-interpretation of Datalog programs estimates relation sizes to drive a heuristic SIPS choice; evaluated on 100+ queries, it yields significant gains and never degrades when magic is unhelpful. (summarized by gpt-5-nano on Feb 09 2026)
Incoming Non-self Citations Over Time
Authors
- 1. Damien Sereni (Semmle Limited)
- 2. Pavel Avgustinov (Semmle Limited)
- 3. Oege de Moor (Semmle Limited)
BibTeX Citation
@inproceedings{sereni_sigmod08,
title = {{Adding Magic to an Optimising Datalog Compiler}},
author = {Sereni, Damien and Avgustinov, Pavel and de Moor, Oege},
series = {{SIGMOD} '08},
booktitle = {Proceedings of the {ACM} {SIGMOD} International Conference on Management of Data},
publisher = {Association for Computing Machinery},
doi = {10.1145/1376616.1376673},
url = {https://dl.acm.org/doi/10.1145/1376616.1376673},
year = {2008}
}
Incoming Citations (Sorted by Pagerank)
Showing 2 of 2 citing papers.
| Rank | Citing Paper | Year | Venue | Pagerank |
|---|---|---|---|---|
| 6,008 | More Efficient Datalog Queries: Subsumptive Tabling Beats Magic Sets | 2011 | SIGMOD | 6.0114207e-05 |
| 9,850 | Materializing Knowledge Bases via Trigger Graphs | 2021 | VLDB | 5.2094004e-05 |
Previous
Page 1 / 1
Next
Outgoing Citations (Sorted by Pagerank)
Showing 11 of 11 cited papers.
Citations counted here include only citations to other VLDB/SIGMOD/CIDR/PODS papers in this database.
| Rank | Cited Paper | Year | Venue | Pagerank |
|---|---|---|---|---|
| 16 | MAGIC SETS AND OTHER STRANGE WAYS TO IMPLEMENT LOGIC PROGRAMS (Extended Abstract) | 1986 | PODS | 0.00060089598 |
| 143 | Optimization of Nonrecursive Queries | 1986 | VLDB | 0.0002959213 |
| 344 | On the Power of Magic | 1987 | PODS | 0.00020659405 |
| 698 | Optimization of Large Join Queries: Combining Heuristics and Combinatorial Techniques | 1989 | SIGMOD | 0.00014879675 |
| 1,037 | Cost-Based Optimization for Magic: Algebra and Implementation | 1996 | SIGMOD | 0.00012494928 |
| 1,306 | An Algorithm For Ordering Subgoals In Nail! | 1988 | PODS | 0.00011234343 |
| 1,382 | Estimating the Size of Generalized Transitive Closures | 1989 | VLDB | 0.00010965236 |
| 1,410 | Magic is Relevant | 1990 | SIGMOD | 0.00010853223 |
| 3,650 | Implementation of Magic-sets in a Relational Database System | 1994 | SIGMOD | 7.2249961e-05 |
| 4,520 | Context-Sensitive Program Analysis as Database Queries | 2005 | PODS | 6.6472658e-05 |
| 6,310 | Type Inference for Datalog and its Application to Query Optimisation | 2008 | PODS | 5.9176726e-05 |
Previous
Page 1 / 1
Next
Semantically Similar Papers
| # | Overall Rank | Paper | Year | Venue |
|---|---|---|---|---|
| 1 | 3,603 | Overbound and Right-Linear Queries | 1991 | PODS |
| 2 | 16 | MAGIC SETS AND OTHER STRANGE WAYS TO IMPLEMENT LOGIC PROGRAMS (Extended Abstract) | 1986 | PODS |
| 3 | 6,948 | On the Expected Size of Recursive Datalog Queries | 1991 | PODS |
| 4 | 3,307 | Magic Conditions | 1990 | PODS |
| 5 | 9,981 | Magic Functions: A Technique to Optimize Extended Datalog Recursive Programs | 1987 | VLDB |
| 6 | 6,008 | More Efficient Datalog Queries: Subsumptive Tabling Beats Magic Sets | 2011 | SIGMOD |
| 7 | 1,037 | Cost-Based Optimization for Magic: Algebra and Implementation | 1996 | SIGMOD |
| 8 | 7,131 | Magic-sets Transformation in Nonrecursive Systems | 1992 | PODS |
| 9 | 3,650 | Implementation of Magic-sets in a Relational Database System | 1994 | SIGMOD |
| 10 | 1,410 | Magic is Relevant | 1990 | SIGMOD |