Actually, it's only three steps (extract the branch, slide the
interval, inject the branch).  Just that rather than a single record,
an average of roughly (N / 2 ) + 2M records need to be updated (where
N is the number of records in the table, and M is the size of the
subtree).

cheers,
barneyb

On 1/31/06, Brad Wood <[EMAIL PROTECTED]> wrote:
> Ok, but let try and move a large branch of a nested set somewhere else
> in the hierarchy.  :)
>
> I'll begin with the adjacency list model:
>
> Step 1: Update predecessor_id of the top of the branch
>
> Done.
>
> And now I'll start us off with the nested set model (Turn page over and
> write on back if you need more room)
>
> Step 1:
> Step 2:
> Step 3:
> Step 4:
> Step 5:
> Step 6:
> Step 7:
> Step 8:
> Step 9:
> Step 10:
> Step 11:
> Step 12:
>
> (yes, yes, I know.. we were talking about deletion, NOT moving-- I just
> couldn't help myself :] )
>
> ~Brad
>

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230906
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to