Improving performance with bulk processing

From PegaWiki
Improving performance with Bulk processing /
Revision as of 08:05, 14 September 2022 by Zajcr (talk | contribs) (Minor edits + publishing)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Improving performance with bulk processing

Description Best practices for improving reporting performance by using bulk processing.
Version as of 8.1
Application Pega Platform
Capability/Industry Area Reporting



Getting started[edit]

This document provides instructions on how to avoid processing of large sets of results which uses a lot of system resources causing performance issues. Iterative approach helps to achieve same goal without impacting system resources.

Implementing iterative approach with Report definitions and Obj-Browse improves query performance and reduces memory footprint.

Example[edit]

A user wants to update 500 000 eligible cases in a nightly batch job with One time utility. Retrieving that high number of records directly degrades application performance.

Steps[edit]

Design Option One:

The following approach works for both activity Obj-Browse method and Report Definitions.

  1. Define hasMore parameter and set to true before calling Obj-Browse or Report Definition.
  2. Start looping by using loop option in activities, and configure precondition for that step.
  3. Obj-browse or Report Definition should use any unique numeric property that is sorted by the ascending order.
  4. You can do business logic after this step on the results set. Once business logic is done at the end, set values Param.hasMore based on pxMore from Resultset page and set last processed id.

    Note: The pxMore is set by Pega to true if there are more records left for your query. That is indication for system to continue the loop. When there are no records left, loop precondition fails, and the step is exited.


Design Option Two:

The following approach works only with Report definition.

  1. Set Dynamic pagination values for Report Definitions.
  2. Call report definition in the loop.
  3. Set the the HasMore parameter value to false when page count matches with current page.



Results[edit]

It helps to improve overall application performance and can avoid exceptions and timeout issues with DB queries.