3 ms·
> All they had to do was implement a nested set pattern for their groups [1] Per your source, though, "Nested sets are very slow for inserts because it require
by ben509 7y ago
> All they had to do was implement a nested set pattern for their groups [1]
Per your source, though, "Nested sets are very slow for inserts because it requires updating left and right domain values for all records in the table after the insert."
The same must generally be true for any solution that maintains its own index in order to guarantee a single* query can traverse the graph. You're memoizing the traversal, after all. It's much simpler and faster if the DBMS can simply perform a traversal, and it's what you want.
And, again, you're maintaining a lot of unnecessary code for one system, which was their chief complaint.
* You could probably implement a scheme that doesn't require materializing all adjacencies so you strike a balance between the number of queries and number of updates, but that's a lot of engineering, and again the same basic complaint.