Database slow to open after bulk update

A new text field is added to almost a million documents (average size 1000 bytes) in a database, via an agent which uses a series of StampAll calls to apply a different value in this field for various subsets of the data. The new field is not used in any views (it is used only to control the display of sections of a page in the web browser).

The database cannot be opened for over an hour after the agent has finished. I thought perhaps Update was being triggered, although the new field is not used in any views, but ‘Show Tasks’ on the server does not indicate any tasks are acting specifically on that database. Everything else on the server is working as expected. Any ideas what would cause this delay?

Thanks,

Steve Sherwood.

Subject: RE: Database slow to open after bulk update

The delay is caused by view re-indexing. You can’t expect the view indexer to know that the modification you have made to a document will not affect its status in the view – it has to check, for each modified document. Even if the server-side view updating process doesn’t immediately start doing automatic updates, “using the database” starts an on demand view index update in whatever view you’re trying to open (or, if you’re opening a form, the update is for any views used in keyword lookups).

An hour does seem excessive even for a million documents. It may be that your views need streamlining. Do they make use of lots of categories, the same document appearing multiple times, complex formulas, …?

Or possibly, “using the database” requires the updating of several views? I guess it also depends on the server speed and load.

Is it really necessary to modify all these documents often? Can’t you build whatever criteria you use to decide what to assign the fields, into the design of the form, so that these field values are calculated as needed when a document is opened? Or it may help to limit modifications by adding logic to avoid “stamping” documents with the values they already have.

Subject: RE: Database slow to open after bulk update

Thanks for the feedback Andre.

This update was a one-off exercise after a design change. I was curious about the delay in being able to open the database after the agent had run. Given that the new field is not used in any view, I had hoped that the indexer task would be able to ascertain that it did not need to do any re-indexing in this case - seems rather a waste of server resources.

Regards,

Steve.