Hi Barney, Agree wholeheartedly with performance comments re: my approach. Never said it was good - I just didn't know about nested sets in '97!!! Am looking to port to a nested set model based on your comments.
Do you know any easy way to get the nest level for each record using a nested set without additional queries? For example, a fully extended sidebar navigation pulling from a nested set page table with a different style for each indent level . . . Best Wishes, Peter -----Original Message----- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 4:22 PM To: CF-Talk Subject: SPAM-LOW: Re: Nested Set Model > That doesn't sound very static at all. The question is how often it happens. I'd rather spend 20-fold the time to move categories 50 times a day than I would spending 3-fold the time to recall the stuff 5,000 times a day. > If these changes are infrequent and or the table will always remain > very small, you should be ok. I have several sets that number in the thousands. No performance issues at all with moving subtrees around. Mods still complete in tens of milliseconds. When you consider caching extra data in an adjacency list (like the depth and/or path data), suddenly your tree modifications require changing just as many nodes as you'd have to mod in with a nested set. If I reorder peer nodes with a nested set, I have to change the nodes and all their decendants. If I do it with the path data as Peter proposed, I have to do the same thing. The same thing goes for moving subtrees (since reordering is just a special case of moving a subtree). With Peter's proposal, I also have slower recall (searching substrings, rather than numeric indexes), and more wasted storage (the length of his globalOrderer field). Bottom line, make sure you consider all the ramifications of your "efficiency" improvements, or you could be worse off (paying the same price, but not gleaning all the benefits) cheers, barneyb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231043 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54