News for hackers. Stuff that matters.
Re:SQLite now allows multiple recursive SELECT statements in... by abetlen on Wednesday October 21, 2020 @09:07AM (#24847457)
While you can use recursive common table expressions to perform graph queries, certain queries like breadth-first traversal are not very efficient for anything but trees (not even DAGs). See my post on the sqlite forum from the other day for more details

https://sqlite.org/forum/forumpost/cd5ff0a1d4?t=h

Re:SQLite now allows multiple recursive SELECT statements in... by jasonhansel on Wednesday October 21, 2020 @10:09AM (#24848026)
IMHO fixing this is more a job for the query planner/optimizer than for the SQL language itself. I wonder if there's a more general optimization that would help with this and other similar graph-related tasks...
Re:SQLite now allows multiple recursive SELECT statements in... by jandrewrogers on Wednesday October 21, 2020 @10:59AM (#24848505)
It isn't a query planner/optimizer problem.

Generalized graph traversals require each query to have additional data structures that grow with table size. This becomes an expensive proposition as tables get large, especially if you have many concurrent queries. Some databases designed for graph processing have internals and storage models that make it more efficient to resource manage this extra state. A SQL database, which has other priorities, would not implement this.