You mean the Joe Celko model? It's a great way to store tree data and to manipulate it but if you're hitting it every time for display then it's no wonder you have a slowdown. Really, what should be done is to store the info in the Celko model and then everytime something changes to store the newly completed tree somewhere (or in a separate table?) where it can be quickly retrieved. Changes to trees are made during "upkeep" etc but then displaying the tree between changes would be redundant to 'regenerate' the tree
You could do the generation of the tree and then use a separate table (obviously non-normalized) which records ordered from top to bottom in the way determined by the actual tree query. You could also save it as XML at that point too. -----Original Message----- From: Luce, Greg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:01 PM To: CF-Talk Subject: Nested Tree DHTML I have a nested tree built with Steve Nelson's model. I'm also presenting it with the tigra tree DHTML package. It's gotten so large it takes 215 seconds to resolve even with the query cached! The package takes one long character string and parses it out into tables and such. Any ideas on how to speed this up? I had thought originally that caching the query and possibly even running it in the background as a task would make it workable, but no. Queries application.tree (Records=6917, Time=Cached Query) SQL = SELECT Child.Category_ID, Child.Category_Name, Count(Child.StartBranch) AS lvl, Child.StartBranch, Child.EndBranch FROM category_tree AS Parent, category_tree AS Child WHERE Child.StartBranch BETWEEN Parent.StartBranch AND Parent.EndBranch GROUP BY Child.StartBranch, Child.Category_ID, Child.Category_Name, Child.EndBranch ORDER BY Child.StartBranch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4