Subject | Re: [firebird-support] Re: Tree Sql query |
---|---|
Author | Jerome Bouvattier |
Post date | 2004-03-24T23:25:57Z |
John,
an insert could be even worse. It's not only parents that must be updated,
but all what is on "right" of the inserted node. So no matter how deep the
tree, inserting near the "left" of the tree won't cost the same as inserting
near the "right".
I'll need such code very soon, and I'll be happy to start with something
tested.
Best regards.
--
Jerome
> I'm less impressed after running some tests:I agree. I read the article a while back, but I remember the side effect of
> 2) Inserting a new node involved updating all parent records - which
> is quite blocking. (those transactions had better be very quick
> indeed!)
an insert could be even worse. It's not only parents that must be updated,
but all what is on "right" of the inserted node. So no matter how deep the
tree, inserting near the "left" of the tree won't cost the same as inserting
near the "right".
> After testing, I'll stick with the old technique. With Firebird'sJohn, would you be so kind as to post one of those SPs for the example ?
> fast stored procedure language, it performs very well.
I'll need such code very soon, and I'll be happy to start with something
tested.
Best regards.
--
Jerome