Optimizing Database views

Written – July 21 2010
Recently I had a user complain that when he uses one of our databases he is getting a lot of lag navigating within the view.
Of course when I test it, it’s always super responsive.
A quick look and I was able to remove the usual suspects

• To many Categorized Columns
• over use of sorts
• selection formula
• Reader field… Bingo
Since I had access to all the data the view was performing perfectly, but since this user had very restricted access to the data, he was experiencing tons of lag.  I won’t go into the details of why this is an issue but simply say that the Domino has to go thru the entire list and determine if the user has access or not to a Document and after a certain amount of accessible docs are reached display the info to the user.  And if the user scrolls down repeat the process….

There are a few tricks to help you out with this.

• The classic Embedded view  using Single Category
• Using a Categorized view
• Then there is another trick I use which I do not find is well documented anywhere, creating a hidden column that is sorted by the reader’s field.  I once read a will written document related to this but can no longer find it, so if you know where it is please let me know or forward it to me.  This trick cause all the docs that the user has access to, to be grouped together so Domino has to deal less with the docs the user does not have access to.
• Just yesterday Andre Guirard posted a new technique which I have never seen and will be testing out shortly, he is using the @SetViewInfo formula to limit the selection.  I urge everyone to take a look at this.  (Thanks Andre for sharing this with us)
There are a few other tricks you can use to optimize your views.  I encourage you to take a look at these articles which lists them in detail.






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s