I came here to mention these too. One addition that can be helpful in large trees is to add a depth attribute to each node so that you can easily limit the depth of subtree you retrieve.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments