Re: Nested Sets vs. Nested Intervals

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 16 Nov 2005 14:59:13 -0800
Message-ID: <1132181952.963682.88500_at_o13g2000cwo.googlegroups.com>


asdf wrote:
> To get a path from an id, how much more efficient is the nested
> intervals method compared to this adjacency list model?
>
> example of selecting the path from the adjacency list:
>
> SELECT parent, name INTO p1, n1 FROM web_directory WHERE id = 1234
> SELECT parent, name INTO p2, n2 FROM web_directory WHERE id = p1
> SELECT parent, name INTO p3, n3 FROM web_directory WHERE id = p2
> SELECT parent, name INTO p4, n4 FROM web_directory WHERE id = p3

About the same on server side. Your method has small overhead incurring while doing multiple SQL calls. Received on Wed Nov 16 2005 - 23:59:13 CET

Original text of this message