Re: Nested Sets vs. Nested Intervals
Date: 17 Nov 2005 14:19:32 -0800
> > > What are the other advantages?
> > Write a query in the adjacency model that calculates the total number
> > of hits in a subhierarchy.
> I could do that in the adjacency model recursively by storing the
> number of website listings in a column.
I don't understand did you mean "precompute hierarchical total", or "calculate it recursively". You can precompute only a limited number of aggregated totals. Some others you would have to query. Example:
How many subcategories called "TOOLS" are descendants in category
/HOME/SOFTWARE/PC/TOOLS You can find them recursively, but (unlike set of queries that find all the ancestors) it is going to be slow. (The chain of ancestors is normally small compared to the size of the tree, the subtree of descendants is not). Received on Thu Nov 17 2005 - 23:19:32 CET