Re: Heirarchical Data Structures. MS Access. Together?
Date: Mon, 28 Jul 2003 10:54:17 -0700
"--CELKO--" <joe.celko_at_northface.edu> wrote in message
> >> one should not allow removal of a parent (i.e. someone that has
> children)... any parent has (right - left - 1) / 2 = number of
> children. <<
> I usually use (lft = rgt -1) to detect leaf nodes. If there is an
> index on (lft, rgt) or just (lft), the speed is pretty good.
> DELETE FROM Tree
> WHERE lft = rgt -1
> AND <<other conditions>>;
This has been discussed once
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=c0d87ec0.02 09111713.1465c102%40posting.google.com&rnum=2&prev=/groups%3Fas_q%3Dindex%25 20lft%2520rgt%2520%26safe%3Dimages%26ie%3DUTF-8%26oe%3DUTF-8%26as_ugroup%3Dc omp.databases.theory%26lr%3D%26hl%3Den
and I still don't understand how this index can be leveraged. Could you please post an execution plan as an evidence of your statement? Received on Mon Jul 28 2003 - 19:54:17 CEST