in reply to Re: Re: Re: Re^3: Efficiently Walking Large Data Structures Stored in Multiple Tables
in thread Efficiently Walking Large Data Structures Stored Across Multiple Tables
Fine. Based on reported experience I believe that the queries to do nested set trees are somewhat complex, but if you have a guide (eg Joe Celko's implementation) in front of you it is not that hard to get it right. Furthermore in practice they are quite fast to execute. Modifications being more expensive than selects, which is OK since in practical applications (eg a threaded view like discussion sites do) you tend to find that selects are more common.
They have further benefits over any kind of iterative requerying in that the usage pattern fits how relational databases are designed. In particular you eliminate a lot of round trips that stress latency and your query optimizer.
If your situation looks like this, then for all of the apparent complexity, knowing that nested set representations of trees are effective can be a lifesaver. (Quite possibly in a literal sense.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re^3: Efficiently Walking Large Data Structures Stored in Multiple Tables
by dragonchild (Archbishop) on Feb 29, 2004 at 21:13 UTC |