It happens from time to time that we are doing performance reviews for various customers with SCSM installations. One key area here is Views. If you want to get a faster console with fast loading views, you need to set those views up correctly.

So what does that mean?

Well besides getting more cowbell (can’t get enough cowbell), then it’s important that your view columns are in match (or almost in match) with the combination class (type projection) you are using for that view. E.g. if you have an Incident view with columns: [Id], [Title], [Status], [Affected User], [Assigned User], [Created Date], then you got yourself a view comprised of the Incident class (derived from work item class) and two relationship classes (Affected User, Assigned User). So in this case you should use a type projection with only those classes. If using a larger type projection, ex. Incident (Advanced) then you got a whole bunch of extra relationship classes that you are not using (Contains Activity, Resolved By User, Created By User, Has Action Log etc.), and even though you are not using those classes, they are still being loaded and affecting performance.

This is nothing new, Microsoft has stated this in their Service Manager Performance technet article and Travis Wright also made an in depth blogpost about it a while ago.

This leads back to our performance reviews – because to actually find out how your views are performing, or more precisely: how close your type projection is with your view usage (columns == type projection components), you need to do some analysis and that takes time. Because when you think about it, it involves going through each view and then find out what type projection it uses, find the components of the type projection (what relationship classes it is comprised of) and compare that with the columns in the view. You could argue that when setting up a view for the first time we make sure to pick the right type projection, but things usually change over time; new views, change of columns etc. And as an external consultant, we often have no control of what views is there already.

SO, to make this process easier, I made a script to do exactly that: find out how those SCSM views are performing.

Here’s an output from the script:

 

viewOutput

viewMedium

image

The script analyzes each Work Item view (can be changed to include Configuration Items as well) and then report back if there is a potential performance problem, aka. does the type projection (if any) have more components than the view is actually using? If it does, then list the impact according to how many more components. I have chosen the following impact order that can be changed if needed:

image

Low: 1..2

Medium: 3..4

High: 5+

 

Usage

.\Get-SCSMViewsPerformance.ps1

Optional parameters

-ComputerName <string> (Default value: localhost)

-ImpactMinimumLevel {Low | Medium | High} (Default value: Medium)

-OnlyAnalyzeCustomViews <switch> (Default value: false)

-IncludeConfigItemViews <switch> (Default value: false)

-GetUserRoleInformation <switch> (Default value: false)

 

Download

https://gallery.technet.microsoft.com/Get-SCSMViewsPerformance-ff52f79d

Script is provided “as-is”