Re: Nested Sets vs. Nested Intervals

From: Mikito Harakiri <>
Date: 17 Nov 2005 14:19:32 -0800
Message-ID: <>

asdf wrote:
> > > 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"? eg.
/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

Original text of this message