DOC Collection deletion

Team,

Is there an effective way to huge document collection, example 200,000 documents I have in a document collection, how can i remove it in faster manner , I tried coll.removeall(True), but it took 10 hours to delete 100,000 documents. :frowning:

Please provide your comments.

Subject: DOC Collection deletion

It is really a huge time you need to delete so many documents. I can delete 10.000 within 5 minutes. Are you sure that there are no other delaying aspects, like network usage or CPU usage involved?

Subject: RE: DOC Collection deletion

Thanks Rob for the response, I’m running the agent on the server copy from my local system, not on there server, does this make a wide difference in performace, I thought the code ‘coll.Removeall(True)’ , is less efficient ,when it come to more than 100,000 documents.

Subject: RE: DOC Collection deletion

How are you getting your document collection? If is via NotesDatabase.Search (or FTSearch if the db is FT Indexed) then you can set a maximum number of documents to be retrieved. All you need to do then is set up a loop to run the search/delete function over again until the search returns 0 documents.

It will definately run faster serverside as there is no UI interaction and also no network traffic involved.

hth

Pete

Subject: RE: DOC Collection deletion

If you are running it locally from your client it will take longer. If you run it on schedule from the server it “should” run much faster.

Subject: RE: DOC Collection deletion

Thanks Pete and Paul. I have tried one more option, I have used @commands, which done job more effectively and in very quicker time.

@Command([MoveToTrash]);

@Command([EmptyTrash]);

@All

Subject: RE: DOC Collection deletion

Notes Formulas and Simple Actions are always much quicker as they use less memory.