View Performance - Changing views

Hi all,

Strange behaviour on view performance when swapping between views.

Example database is 40GB and has a view which contains 400,000 docs of a total 700,000 docs

When swapping from a view into the large view, there is a v.long delay. (can be >20secs but usually <10)

As the users swap into this view often, the delay is very noticable, and added up over a day, is time consuming.

This occurs for all heavy users of the DB + myself as an administrator who does not use the database often.

BUT, when using a Developer ID (that all design elements are signed with - not that it may be related to the issue) the view swapping is sublime. (<2secs everytime)

I have…

Used a Cross-Over cable to the server to check bandwidth - same results comparing my ID to Developer ID.

Built a fresh PC and Notes 7.0.2 Client - same comparing my ID to Developer ID.

How on earth can I trace this delay ?? Why is the performance good for this one ID ?

Cheers

Paul

Subject: View Performance - Changing views

Do the docs in the view have reader fields on them?

Frunobulax

Subject: RE: View Performance - Changing views

I have found (on Sent Messages only), a Readers and Authors field. There are no $Readers / $Authors fields.

The users of the database have Editor Access

The Developer ID and myself have Manager Access

Based on that, my understanding is that the Authors field is useless and the Readers field will provide access to all as its “” ?

But I imagine that this would be a performance hit. But not sure how this translates into differing performance from users IDs and the Developer ID, but could be a performance hit in general that could be removed ?

The Authors field is below…

Field Name: DummyAuthors

Data Type: Text

Data Length: 32 bytes

Seq Num: 3

Dup Item ID: 0

Field Flags: SUMMARY READ/WRITE-ACCESS NAMES

“; ”

Group1 contains all servers and many people, but not any users of this database.

Group2 contains all administrators - so would include me and the Developer ID

The Readers field is below…

Field Name: Readers

Data Type: Text

Data Length: 0 bytes

Seq Num: 1

Dup Item ID: 0

Field Flags: SUMMARY READ-ACCESS NAMES

“”

Subject: RE: View Performance - Changing views

Please read this excerpt from an Application Performance document published by IBM a while ago:

Reader name fields can affect view performance. Reader name fields can provide document security, but can have adverse affect on views that display documents that contain reader name fields.For example, suppose you have a Human Resource database for your 10,000 employees and suppose there is a flat view (not categorized) that displays all 10,000 documents. Every employee can see only his/her own document due to Reader Names restrictions. When an employee opens the database, the Domino server sorts through the documents to determine which ones should be shown to the user. Normally, without Reader Names, the first 30 or so documents are displayed to the user, filling the screen. You can do a quick test to confirm this in any database by opening a view and then pressing the down arrow. You scroll quickly for a dozen or so rows; then there is a pause, usually less than a second in duration, while the server grabs another chunk of data to be displayed. The scrolling recommences for 30 or so rows, then another pause occurs, and so on. In the HR application, however, the server is unable to fill the user’s screen with data. That is not a problem, but the server has no way of knowing that it can’t fill the screen, so it continues to sort through all 10,000 documents,looking for more documents that are visible to the user. Finally, exhausting all documents, the server gives up and shows just the one document, but the delay may be considerable. In an isolated environment, the delay might be seconds, but in a real-world production environment, with many users trying to perform a similar task, you can easily have most users timing out because of the delay.

There are a few alternatives that can help you avoid this problem:

  1. Categorize the view, and initially collapse the categories in the view by selecting the "Collapse all when

database is first opened" option. Although it is true that this setting carries a slight performance hit, in this

situation it produces a great saving.

  1. Avoid selecting the “Don’t show categories having zero documents” option to show only categories containing

documents. Selecting this option has the same result as using a flat view: The server has to check all 10,000

documents before displaying anything to the user.

  1. Use an embedded view that displays a single category. Use an @UserName formula to display only the

documents for that user. This is a fantastic performer, and it works brilliantly for Web browsers, too!

Note that the performance issues associated with reader name fields in a view are the same regardless of whether

your users have Web browsers or Notes clients.

HTH

Sai

Subject: RE: View Performance - Changing views

Hi Sai,

The original developers must have looked at this, as the view is Categorized and set to collapse and not set to hide empty categories.

I should imagine that this scenario would cause performance hits for all users, as the number of documents that are available to the users is always the same as the Reader / Author fields are not restricting access.

Any other ideas?

Cheers

Paul

Subject: RE: View Performance - Changing views

We have had problems with FTIndex(server cpu shoots up whenever update task runs. Now changed the update to less frequent using a program document), View Indexes(removed a lot of column sortings which inturn reduces the num of indexes), views being slow etc, but never this kinda problem.

If the Reader’s field ain’t doing nothing, I would suggest to remove the Reader’s field by running an agent overnight before the updall/update task runs. This would alteast eliminate one of the possible culprits. Please keep posting whatever the outcome.

HTH

Sai

Subject: RE: View Performance - Changing views

Sai, thank you for plugging my article :slight_smile:

Tommy, the situation you describe does sound like a readers field issue because it seems like the same machine has different performance characteristics depending upon the id being used on that machine. If that is so, then perhaps verify this by taking a user id (user = slow performance) and give that particular person an explicity ACL entry with all [roles] that your developer (developer = fast performance) has. Now switch to that user id and see if it’s fast. If so, then you definitely hit the problem.

As suggested, if your readers fields are not being used, then nuke them. Only pain can result from unused readers fields.

Alternatively, you can look at other ways to approach your view. Collapsed categories usually speed things up considerably, but embedded views using show single category are much faster still. It could be that your server is straining under load and having to work out the logistics for such a large view puts it slightly over the edge (= slow response), in which case it could be that general server tuning might help your problem.

But your initial description definitely makes it sound like reader names are at the root of the problem.

regards,

raphael