We are currently diagnosing an application that when first used, runs very slowly, and on subsequent uses runs approximately 16 times faster. We’re 99% sure it comes down to view indexes.
The application runs locally on the client and looks up data from another notes database. The lookup database primarily contains product information & logs of product changes. The database is udpated everyday, so there are document changes in the order of 400 docs per day. The database has roughly 120,000 documents, with 56,000 being logs, with the remaining 65,000 documents being data.
My question is, when a view is accessed via lotusscript (using notesdatabase.getView), which of the following happens?
-
any documents modified or created (regardless of whether they meet views criteria) need to be assessed for eligibility for the view and the eligible documents added into the view index OR
-
the view index already knows which documents are valid for the view and only updates the index with the details from the eligible documents.
What we are trying establish is whether the addition of the log documents to the database affects the performance of the lookup views - even if the lookup views don’t contain the logs. So if indexing worked as described as option 1 above, then the prescence of the logs would cause the application to slow down more than than if it worked as described in option 2.
Additionally, does the size of the individual documents affect performance, or is it simply the number of documents?
Although we know our solution is to move the log documents out of the lookup database altogether (the users don’t need tha data locally), it would be beneficial for future application development to know how it works. 90% of our user base work locally on offline replicas, so it would be great to know how the indexing worked!
Also, I have done some research on view optimisation, but there’s always the assumption that applications run on Domino Servers, rather than on local disconnected clients which I always find frustrating! (e.g. IBM Developer).
Thanks in advance
Phil