Content deleted Content added
Line 88:
==Drawbacks==
Nested sets are very slow for inserts because it requires updating left and right ___domain values for all records in the table after the insert. This can cause a lot of database thrash{{Citation needed|date=August 2012}} as many rows are rewritten and indexes rebuilt. However, if it is possible to store a forest of small trees in table instead of a single big tree, the overhead may be significantly reduced, since only one small tree must be updated.
The [[Nested intervals|nested interval model]] does not suffer from this problem, but is more complex to implement, and is not as well known. The nested interval model stores the position of the nodes as rational numbers expressed as quotients (n/d). [http://www.sigmod.org/publications/sigmod-record/0506/p47-article-tropashko.pdf]
|