Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Proper siblings sorting in nested sets model

Re: Proper siblings sorting in nested sets model

From: Pavel Schevaev <pacha_shevaev_at_mail.ru>
Date: 12 Apr 2004 00:42:21 -0700
Message-ID: <320b3b2.0404112342.140438c5@posting.google.com>


>
> Why your example is not ordered by paths
>
> KING
> KING.A-FILES
> KING.A-FILES.A-FILES
> KING.A-FILES.B-FILES
> ...
>
> ? Whatever function you use for sibling ordering should work for
> concatenated path ordering, right?

But why...it is sorted in the very this order...(or i'm missing something)

>
> I missed a minor detail in my post. What if you have 2 KINGs at the
> same level? Easy: just concatenate whatever sort criteria you use with
> unique node identifier, say lft:
>
> KING1
> KING1.A-FILES2
> KING1.A-FILES2.A-FILES3
> KING1.A-FILES2.B-FILES7
> ...

I see your point. It is only a question of proper ordering attributes concatenating, right? I pray for mysql to support something like that...

But what about speed? You suggest using subquery to build concatenated path, what about 100K nodes tree?

P.S. by the way i'm very impressed with your nested intervals method Received on Mon Apr 12 2004 - 02:42:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US