I have a datebase containing around 250,000 documents up to 12 months old. The last 30 days documents are updated by and hourly agent by deleting and recreating them (using data imported from sql query) as this seems to be faster than searching for and updating each document. Another agent runs nightly and performs the same operation on the other 11 months of documents. The problem I am having is the hourly agent takes around 15 mins to run and access to the documents during this time is almost impossible (this database needs to be VERY responsive), but after the agent has run access is still slow (via web access) unless I physically go into the view in the database which I believe reindexes it. What I want to know is if I can do the reindex using the agent after it has manipulated the files?
Software/Hardware used:
ASKED:
September 16, 2008 9:39 AM
UPDATED:
September 16, 2008 4:19 PM
To rebuild several DB view indexes via LotusScript…
Dim s As New NotesSession
Dim dbThis As NotesDatabase
Dim vCurView As NotesView
Set dbThis = s.CurrentDatabase
Set vCurView = dbThis.GetView(“View 1 Name”)
Call vCurView.Refresh
Set vCurView = dbThis.GetView(“View 2 Name”)
Call vCurView.Refresh
Set vCurView = dbThis.GetView(“View 3 Name”)
Call vCurView.Refresh
Use Updall. That’s what Program documents are for.
Well, using program documents for Updall are indeed much better … at least, if and when you know exactly when you want the view refreshing/rebuilding to take place.
However, if you have a daily scheduled agent that updates thousands of documents and it varies widely in how long it takes, then adding code at the end of that existing LotusScript agent to automatically refresh the views upon agent completion will prevent the next users of the database to get hit with a big delay (while the views’ indexes rebuild/refresh) – and yet will kick off immediately after your agent’s main processing has been completed.
Now … if you know a way to run/call Updall from LotusScript … now THAT would be the best of both worlds.