News for hackers. Stuff that matters.
Re:Subcases and Hierarchy by epe on Wednesday September 02, 2009 @03:18PM (#800890)
Am I missing something about the database section? It seems like if I add, e.g. a right child to node B in the diagram, I will have to update the "right" values on nodes A & B, as well as both the "left" and "right" values on C & E. Imagine doing this with a much larger subtree where C is, and you're looking at a ton of UPDATEs to store one new node, aren't you?
Re:Subcases and Hierarchy by gecko on Wednesday September 02, 2009 @03:21PM (#800896)
Yes. The good news is that you read hierarchies much more often than you update them, and hierarchies in a bug tracker are going to be relatively tiny, so taking a minor write-hit in exchange for a massive read improvement is a logical trade.
Re:Subcases and Hierarchy by sanj on Wednesday September 02, 2009 @03:23PM (#800902)
You're exactly right. Any insert will end up incrementing every node on its right. Any deletion, will end up decrementing every node on its left.

It's possible you could do the deletions silently, because you don't actually care about gaps. But I don't see any way around inserts being expensive.