MySQL Forums
Forum List  »  Newbie

Re: Traversing a Category tree, is there an easy way to do this? Need an experts opinion!!!!!
Posted by: Jay Pipes
Date: July 12, 2005 11:47AM


Nested set model writes can be sped up significantly by leaving room in the left_side and right_side values for child nodes. In other words, don't "pack" the nested sets into a binary tree (situation where the root node has left_side = 1 and right_side = number of nodes * 2). Instead, determine an appropriate fill factor where the leaf nodes have a right_side buffer of a certain length, allowing for child nodes to be inserted without having to recalculate the entire tree's right_side values from the point of insertion to the end of the tree.

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster?

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.