On 23/3/04 5:08 pm, Kurt D. Zeilenga <[EMAIL PROTECTED]> wrote:

> At 02:12 AM 3/23/2004, Claude wrote:
>> Is walking bottom-up through a subtree deleting each leaf entry the
>> best way to delete the entire subtree?
> 
> Well, by "walking bottom-up", I assume you mean using one-level
> searches to walk down and then delete entries on the way up.
> A better way, I think, is to do a single subtree search and
> then blast deletes for all leafs.  As you get responses back,
> issue deletes for entry that becomes (by prior deletes) a
> leaf.

That's quite neat, but you'll run into admin limit issues fairly quickly
unless you use paged results or similar.

The other trick is knowing when you've got a leaf entry without waiting for
all the results. I'd suggest trying to retrieve the standard X.500
(operational) attribute hasSubordinates (a BOOLEAN) or possibly the
non-standard (operational) attribute numSubordinates (INTEGER) from each
entry. This won't help if your server doesn't support these attributes, of
course.

Cheers,

Chris

Reply via email to