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.

ServiceAPI Example


WebDrawer Example

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.


The outcome

On my large dataset ExcludeCount more than halved the response time on many requests.

The Cost

In WebDrawer the cost is that the page number links no longer work.  This post examines a solution to the broken paging problem.

Written on May 20, 2015