[email]ssidct[/email] wrote:

Please don't toppost.
> I read somewhere that insertions are slow in nested set approach. But
> retrieving all branches for a given node is fast. But each of my
> searches is like insertion. It has to follow down the tree to find out
> where exactly the query belongs before it tells you what else is there
> close by. Hence it is going to be slow no matter which method I use.
If you've defined a proper primary key, 'what's close by' will be retrieved
very fast. The question here is: do you delete/insert records constantly? If
not, the nested set model could well suit your needs.
> This is not multiple nested queries. I don't see how this can be
> slower than nested-set solution which is difficult to do
> insertions/deletions in.
Insertions/deletions will indeed be somewhat more tricky and slower.
Adding/updating information in one row however will be just as fast, if
you've got a proper primary key defined. What will the database be used for?
Does the tree change constantly or is it mostly static?

Grtz,
--
Rik Wasmus