Magic sets and other strange ways to implement logic programs (extended abstract)
PODS '86 Proceedings of the fifth ACM SIGACT-SIGMOD symposium on Principles of database systems
Deforestation: transforming programs to eliminate trees
Proceedings of the Second European Symposium on Programming
FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
Query Optimization by Predicate Move-Around
VLDB '94 Proceedings of the 20th International Conference on Very Large Data Bases
Optimizing recursive queries in SQL
Proceedings of the 2005 ACM SIGMOD international conference on Management of data
Lightweight fusion by fixed point promotion
Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Short cut fusion: proved and improved
SAIG'01 Proceedings of the 2nd international conference on Semantics, applications, and implementation of program generation
Efficient implementation of recursive queries in major object relational mapping systems
FGIT'11 Proceedings of the Third international conference on Future Generation Information Technology
Hi-index | 0.00 |
A recursive SQL-1999 query consists of a recursive CTE (Common Table Expression) and a query which uses it. If such a recursive query is used in a context of a selection predicate, this predicate can possibly be pushed into the CTE thus limiting the breadth and/or depth of the recursive search. This can happen e.g. after the definition of a view containing recursive query has been expanded in place. In this paper we propose a method of pushing predicates and other query operators into a CTE. This allows executing the query with smaller temporary data structures, since query operators external w.r.t. the CTE can be computed on the fly together with the CTE. Our method is inspired on the deforestation (a.k.a. program fusion) successfully applied in functional programming languages.