ExcludeCount and performance
I am doing some load testing on an HPRM dataset containing 16 million records. Response times from our web clients were not great, depending on which search query I used of course. I really wanted to improve this.
A ServiceAPI parameter not often mentioned is ExcludeCount (otherwise known as resultsOnly). This has the effect of committing the SearchTitle and TotalResults properties from the response. Total results in particular can degrade performance on a large dataset as it calculates the total number of records matched by the query.
Setting ExcludeCount as the default in WebDrawer will result in the search results page no longer displaying the search title. To do this add the 'resultsOnly' attribute in the Record route defaults, as seen below. Ensure you set this on the route named Record with the model named Records.
<add name="Record" model="Records" template="WDRecordList" properties="RecordRecordType,RecordExtension,RecordTitle,RecordNumber" pageSize="15" resultsOnly="true"/>
On my large dataset ExcludeCount more than halved the response time on many requests.
In WebDrawer the cost is that the page number links no longer work. This post examines a solution to the broken paging problem.