MySQL Forums
Forum List  »  Newbie

Re: Traversing a Category tree, is there an easy way to do this? Need an experts opinion!!!!!
Posted by: Erin ONeill
Date: July 12, 2005 10:46AM

I'm in the process of helping one of my programmers create better tables. Now that the redundant index lecture is over, as well as the PLEASE use date datatypes he pulls out this code (not documented) and I find out it's based on Celko's modified preorder traversal tree. This sends my mind back to C, datastructures and n-ary trees which I learned oh so long ago.

My concerns (besides the tables looking rather cryptic) is that this seems like a great technique for information that isn't updated/inserted very often. That is NOT the case here. So neither the adjacency tree or the nested set tree seems like a good solution? Or am I just being paranoid? should I just work on field names (making them more clear) and indexes? I've finally got my Server key writes down, my slow_query_log down (and those all belong to the 3rd party bulletin board we have).

Any suggestions on things to look at? I've read all the celko articles as well as this article:

Any thoughts on how to speed up writes to a nested set? or should I abandon that in favor of something else?

Using MySQL 4.0.20 so no triggers/procedures. All work will be done in MySQL and php ...


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.