top of page

Unraveling the Mystery of Declared Index in Pega: A Professional Perspective

Grasping the Concept


In the world of Pega, understanding its features can greatly impact the efficiency of developers and business analysts. One crucial feature is the Declared Index. This post aims to clarify what Declared Index is, why it matters, and how to implement it effectively. Whether you are a skilled developer or just starting with Pega, this guide will provide you with insights to boost your understanding around Declared Index.


Eye-level view of a Pega platform interface showcasing data implementation
Declaring Index in Pega interface

Understanding BLOB (Binary Large Object)


Before understanding the Declared Index benefits, we first need to understand BLOB column in Pega. When you create a property in Pega class the value of that properties will be stored into blob column of the DB table. In Pega, blob columns contain encrypted and compressed data which saves amount of storage required to store the data and that's because the blob is used to store the data of complex objects like Page list Page groups etc.


Now reading a blob column could be time consuming because we have to decompress the data then decrypt it, the decompressed data will be nearly triple or more than its size when store into blob.


Therefore, reporting properties from this blob column or from Complex data object like Page list or Page group would take more time and Pega recommend optimizing these properties.


Property Optimization

Property Optimization is used to enhance the report performance when it has properties which is part of complex data objects like Page List or Page groups. Until now it is clear that managing Blob column is performance intensive operation and Property Optimization aims to give better performance in reporting properties which are stored into blob column.


Now, let's understand how Property optimization works. For example, we are developing a report in a work class and this work class has a page list Called Employee. In report, we want to show the Employee Name which is part of Employee page list. When we optimize the Employee Name property Pega does following things in the background.


  1. Pega creates a concreate class and create a property into this class for Employee name.

  2. The class name starts with "Index-", this is called Index class.

  3. Pega store the Employee name of the page list into this data base table.

  4. Pega also establishes the referential integrity constraint between parent and indexed table. In simple term we can say Primary and foreign key relationship.

  5. Every time a new record is inserted (or a record is deleted), Pega make sure to insert data into both Parent and Index table automatically, this is performed with help of another rule called Declared Index rule.

  6. Declared Index rule maintain the link between Parent and Index class and automatically insert or delete records to maintain the Referential Integrity constraints between both tables.


Performance benefits of Declared Index

Until now we understood that Declared Index along with Index table store data into separate table and also establishes the relationship between tables. But how it helps in improving the performance while reporting a property which is part complex data object or part of BLOB.


Whenever we use a property of Blob column in Report Definition rule, instead of reading the property value from BLOB, it uses the table relationship and read property from Index table. Since Index class is linked with Data base table, Pega reads the data with simple select query and entire Blob column is skipped in this process and thus the performance benefit is achieved.



Rules get created during Property Optimization

  1. Declared Index.

  2. Index Class [ Concrete Class].

  3. Property which is optimized is created in Index class.


Best Practices for Declared Index

  1. Limit the Number of Properties: Keep the number of properties in a Declared Index to a minimum. Focus on those that provide significant value to your application, aiding memory usage and improving performance.

  2. Optimize for Query Performance: Design your Declared Index for the ways the data will be queried most frequently. For instance, indexing properties that are commonly used in reports and filtering can lead to better performance outcomes.


Final Thoughts

Understanding Declared Index is vital for anyone working with Pega. This feature can significantly enhance application performance, data integrity, and rule management efficiency.

By effectively implementing Declared Indexes and following best practices, developers can simplify their tasks and create agile applications. Constantly monitoring performance and adapting to usage trends will keep your applications running smoothly. As you navigate the world of Pega, mastering features like Declared Index can lead to outstanding results in your development projects.

Comments


Post: Blog2_Post

©2022 by pegablogs. Proudly created with Wix.com

bottom of page