Re: Nested Sets vs. Nested Intervals

From: Vadim Tropashko <>
Date: 16 Nov 2005 13:38:11 -0800
Message-ID: <>

asdf wrote:
> The array of folders for:
> is:
> folders[0] = 'Games'
> folders[1] = 'Board Games'
> folders[2] = 'Abstract'
> folders[3] = 'Chess'
> ...
> so the id can be queried very efficiently by first getting the ID for
> the row name = 'Games' AND parent = 0, since the main category's id is
> '0'. It then gets the id for the category called 'Games' and continue
> on with name='Board Games' AND parent equals the id for the row named
> 'Board Games', then continues on until it ends on the last element of
> the array. So this is very efficient.

I have difficulty understanding without the schema. Could you please describe what columns do you store in your table (and if there is more than one table, describe them as well).

> It has to do multiple SELECTs.
> Are multiple SELECTs efficient?

Multiple selects can be efficient if they are not inside loops, or recursion. In word, how many of them your application would typically fire?

> Getting the path does not require multiple JOINs, just multiple
> SELECTs, so the speed is equal to getting the id from the path shown
> above.
> So what are the advantages for Nested Intervals?
> What are the differences in terms of speed between Nested Intervals and
> Is this method more efficient than the speed of LDAP?

LDAP has nothing to do with SQL, or Relational Databases for that matter. Received on Wed Nov 16 2005 - 22:38:11 CET

Original text of this message