[MDEV-13428] Oracle-compatible recursive queries with CONNECT BY Created: 2017-07-24 Updated: 2020-11-02 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Ralf Gebhardt |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
Oracle syntax
Also
Changes need by the parser
Oracle execution algorithmSee MDEV-13482 How to rewrite an Oracle-style CTE into WITH-style CTE
is rewritten into:
Resolved Questions
Unresolved QuestionsSplitting the WHERE clauseOracle manual page says:
so one needs to split the WHERE clause into two parts:
|
| Comments |
| Comment by Sergei Petrunia [ 2017-08-02 ] | |||||||||
|
One question is how scalable/performant cycle detection should be. Created a table with 1M (n, n+1) pairs
this ran instantly. Let's start with (1,2) row and run foward towards 1M:
This query didn't finish in 4 hours. | |||||||||
| Comment by Lixun Peng [ 2017-08-03 ] | |||||||||
|
ORDER SIBLINGS BY clause is needed, we have found some users are using it. | |||||||||
| Comment by Sergei Petrunia [ 2017-08-12 ] | |||||||||
|
An interesting observation re what does NOCYCLE really mean: https://lists.launchpad.net/maria-developers/msg10840.html . Does that have any impact on the execution algorithm? It's not clear, yet. |