3 ms·
Cycles are not a problem: just use `UNION`, not `UNION ALL`. I myself build transitive closure tables that I update incrementally as needed (sometimes in a def
by cryptonector 4y ago
Cycles are not a problem: just use `UNION`, not `UNION ALL`.
I myself build transitive closure tables that I update incrementally as needed (sometimes in a deferred way), so that many of the recursive queries I do can be very fast, but I only build transitive closures for the smallest portion I can (basically group nesting).