News for hackers. Stuff that matters.
Re:SQLite now allows multiple recursive SELECT statements in... by carterschonwald on Tuesday October 20, 2020 @09:41PM (#24844086)
Does this mean it’ll be easy to do graph transitive closure computations in sqlite now?
Re:SQLite now allows multiple recursive SELECT statements in... by seg_lol on Tuesday October 20, 2020 @09:58PM (#24844161)
Do you mean iterating on an agency matrix dimension times to get the full path length between any two nodes?

I have had to run my recursive queries external to the database (MySQL, SQLite), this change looks to bring it into the database. Excellent news!

Re:SQLite now allows multiple recursive SELECT statements in... by castratikron on Tuesday October 20, 2020 @11:04PM (#24844389)
Transitive closure will tell you if a path between two nodes exists, not the length of the shortest path between two nodes.
Re:SQLite now allows multiple recursive SELECT statements in... by whoisburbansky on Wednesday October 21, 2020 @12:35AM (#24844764)
You're technically correct, but afaik there isn't really a way to compute transitive closure without also computing shortest paths along the way, modulo constant factors?
Re:SQLite now allows multiple recursive SELECT statements in... by simcop2387 on Wednesday October 21, 2020 @12:54AM (#24844838)
You'll compute paths along the way but won't know that they're the shortest path. Odds are good though that you'll havr found something good enough for most purposes though.
Re:SQLite now allows multiple recursive SELECT statements in... by whoisburbansky on Wednesday October 21, 2020 @01:00AM (#24844871)
If all you do is iterate over the adjacency matrix, sure, but wouldn't Floyd-Warshall be the same time complexity? All I'm saying is that you get both pieces of information for essentially the same price, modulo constant factors.
Re:SQLite now allows multiple recursive SELECT statements in... by bawolff on Tuesday October 20, 2020 @10:47PM (#24844321)
Even if it is, i imagine its not going to be that efficient if it isnt optimized for that use csse.
Re:SQLite now allows multiple recursive SELECT statements in... by nikeee on Wednesday October 21, 2020 @01:45AM (#24845084)
I solved a task involving transitive closures in last year's Advent of Code using SQLite:

https://github.com/nikeee/advent-of-code-2019/blob/master/06...

How could this be improved with the new feature of SQLite?