<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Supporting Hierarchical Data Sets</title>
	<atom:link href="http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/feed/" rel="self" type="application/rss+xml" />
	<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/</link>
	<description></description>
	<lastBuildDate>Mon, 23 Aug 2010 09:28:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Dusan</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-189</link>
		<dc:creator>Dusan</dc:creator>
		<pubDate>Tue, 13 May 2008 16:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-189</guid>
		<description>@Robert Janeczek:

I would be very interested to know, what was the solution that replaced the nested set afterwards.</description>
		<content:encoded><![CDATA[<p>@Robert Janeczek:</p>
<p>I would be very interested to know, what was the solution that replaced the nested set afterwards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Open Closure &#187; Hierarchical Data Sets</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-149</link>
		<dc:creator>Open Closure &#187; Hierarchical Data Sets</dc:creator>
		<pubDate>Tue, 16 Oct 2007 03:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-149</guid>
		<description>[...] Turland wrote on his blog, &#8220;[the nested set] model is simple and intuitive, but it has a drawback: to obtain any [...]</description>
		<content:encoded><![CDATA[<p>[...] Turland wrote on his blog, &#8220;[the nested set] model is simple and intuitive, but it has a drawback: to obtain any [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Are Pedersen</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-143</link>
		<dc:creator>Are Pedersen</dc:creator>
		<pubDate>Tue, 18 Sep 2007 07:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-143</guid>
		<description>Another way instead of the adjacency model or nested sets is the transitively closed relation. (http://www.dbazine.com/oracle/or-articles/tropashko4)

It&#039;s really a &quot;helper&quot; table, or cache table if you like.
I&#039;we been using it for years and it scales very well.</description>
		<content:encoded><![CDATA[<p>Another way instead of the adjacency model or nested sets is the transitively closed relation. (<a href="http://www.dbazine.com/oracle/or-articles/tropashko4" rel="nofollow">http://www.dbazine.com/oracle/or-articles/tropashko4</a>)</p>
<p>It&#8217;s really a &#8220;helper&#8221; table, or cache table if you like.<br />
I&#8217;we been using it for years and it scales very well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maarten Manders</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-139</link>
		<dc:creator>Maarten Manders</dc:creator>
		<pubDate>Mon, 17 Sep 2007 17:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-139</guid>
		<description>Watch out with nested sets when you often need to query lists of nodes with their level of depth included. Those queries take O(n^2) runtime (indices omitted) and tend to get very slow with big trees.</description>
		<content:encoded><![CDATA[<p>Watch out with nested sets when you often need to query lists of nodes with their level of depth included. Those queries take O(n^2) runtime (indices omitted) and tend to get very slow with big trees.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Janeczek</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-142</link>
		<dc:creator>Robert Janeczek</dc:creator>
		<pubDate>Mon, 17 Sep 2007 07:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-142</guid>
		<description>NestedSet can be a straight path to hell. I haven&#039;t seen any article describing how to deal with multiple updates done at the same time and this is something you can easily overlook. In the simplest implementation concurent updates just break the hierarchy, losing branches etc. This requires implementing locks around most of operations on tree (transactions themselves are not enough!), which slows everything down.

There is additional implicit problem with large hierarchies. Inserts require on average reordering half of the tree, which causes lots of updates. Updating a node in Postgres invalidates a row and adds new version of it at the end of the table. This destroys half of index caches and pretty much requires VACUUM ANALYZE to keep things working.

Be very careful with NestedSet. We&#039;ve used it for over a year  large-scale project and I&#039;d say half of problems with the entire software were caused by NestedSet, which is now being removed gradually.</description>
		<content:encoded><![CDATA[<p>NestedSet can be a straight path to hell. I haven&#8217;t seen any article describing how to deal with multiple updates done at the same time and this is something you can easily overlook. In the simplest implementation concurent updates just break the hierarchy, losing branches etc. This requires implementing locks around most of operations on tree (transactions themselves are not enough!), which slows everything down.</p>
<p>There is additional implicit problem with large hierarchies. Inserts require on average reordering half of the tree, which causes lots of updates. Updating a node in Postgres invalidates a row and adds new version of it at the end of the table. This destroys half of index caches and pretty much requires VACUUM ANALYZE to keep things working.</p>
<p>Be very careful with NestedSet. We&#8217;ve used it for over a year  large-scale project and I&#8217;d say half of problems with the entire software were caused by NestedSet, which is now being removed gradually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: foo</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-141</link>
		<dc:creator>foo</dc:creator>
		<pubDate>Mon, 17 Sep 2007 07:13:27 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-141</guid>
		<description>Remember that updates are costly with Nested Sets. You can use the features that the RDBMS offers you (ORACLE - CONNECT BY, PostgreSql - connectby (contrib/tablefunc.sql), MSSQL - CTE) and stick with just the adjacency model. Tree width and depth also are important.</description>
		<content:encoded><![CDATA[<p>Remember that updates are costly with Nested Sets. You can use the features that the RDBMS offers you (ORACLE &#8211; CONNECT BY, PostgreSql &#8211; connectby (contrib/tablefunc.sql), MSSQL &#8211; CTE) and stick with just the adjacency model. Tree width and depth also are important.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Struckmeier</title>
		<link>http://matthewturland.com/2007/09/17/supporting-hierarchical-data-sets/comment-page-1/#comment-140</link>
		<dc:creator>Tobias Struckmeier</dc:creator>
		<pubDate>Mon, 17 Sep 2007 05:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://ishouldbecoding.com/2007/09/16/supporting-hierarchical-data-sets/#comment-140</guid>
		<description>You should also mention that inserting a node in costs more in  a nested set tree because it has to update more rows in the table than with the adjacency model. So it might be that for applications where you have more write operations than read operations the nested can hurt.</description>
		<content:encoded><![CDATA[<p>You should also mention that inserting a node in costs more in  a nested set tree because it has to update more rows in the table than with the adjacency model. So it might be that for applications where you have more write operations than read operations the nested can hurt.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
