Dear all,I’m using this LS agent to delete about 120,000 imported records from a oracle db…Is there any limitation of deleting this much of records at once.
regards
shana
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set doc = session.DocumentContext
Set db = session.CurrentDatabase
'Remove all prior to Import data
Dim ImportView As notesview
Dim nvec As notesViewEntryCollection
Set ImportView=db.getView("BP_Import_vw")
Set nvec = ImportView.AllEntries
Call nvec.RemoveAll(True)
Subject: Delete documents
The code sample you gave does not delete any records from Oracle, but Notes documents. And yes, deleting 120000 Notes documents and then recreate them through import IS a bad idea.
Not only will it be slower then updating documents, that require an update at all. Depending on how often you do that, your DB might get flooded with deletion stubs. Should this database be intended to replicate, it’s going to be even more fun. Slow fun.
A common approach is to calculate a checksum for all the data in a Notes document, compare that to a checksum for the associated record from the RDBMS and only update fields (all or individual fields, you have to find the balance yourself), if there is a difference. You can even (ab)use @Password for that.
Subject: RE: Delete documents
Thanks for your response…This agent runs only once a day at 1am…and replication is not involved.
Subject: RE: Delete documents
I still wouldn’t use “once a day” along with “only”.
Deleting an recreating 120.000 docs each and every day, will leave you with a massive amount of deletion stubs. If there never is any replication, you should at the very least open replication settings and on the space savers tab reduce the number in the field “remove docuemnts not changed in XX days”. Do NOT check the box, but set the number to a value of 1 or 0.