order of the execution in a report definition if you specify the all three joins

I have specified the class join, association rule and index join in the report definition.

What is the order of the execution of these joins ? I mean which one execute first?

@ravikumard5507

The order of execution of Join as below:

Index Join

Association

Class Join

@ravikumard5507

In Pega, when configuring joins in a Report Definition, the execution order of these joins (Class Join, Association Rule, and Index Join) can impact how the data is retrieved and displayed. Here’s a detailed explanation of how these joins are executed:

Execution Order of Joins in Pega Report Definition

  1. Class Joins
  2. Association Rules
  3. Index Joins

Let’s break down each type of join and its execution order:

1. Class Joins

Class Joins are specified directly within the Report Definition and are typically used to join data from related classes. They are the first to be executed. When you define a Class Join:

  • Pega retrieves data from the primary class specified in the Report Definition.
  • It then joins the data with the related class based on the conditions you’ve specified.

2. Association Rules

Association Rules are reusable join definitions that can be created separately and referenced in multiple Report Definitions. After Class Joins are processed, Association Rules are applied:

  • Pega processes the Association Rules defined in the report.
  • It uses the join conditions specified in the Association Rule to join the necessary classes.

3. Index Joins

Index Joins are used to join the main class with index tables. These are executed last in the sequence:

  • Pega performs the Index Joins after completing the Class Joins and applying Association Rules.
  • Index tables, which often contain denormalized or pre-aggregated data, are then joined with the main class data to enhance the report.

Summary of Execution Order

  1. Class Joins: Executed first, joining the primary class with other specified classes directly within the Report Definition.
  2. Association Rules: Executed next, applying predefined reusable join definitions to the data retrieved from the Class Joins.
  3. Index Joins: Executed last, joining the main class data with index tables to retrieve additional or aggregated information.

Practical Implications

  • Performance Considerations: The order of joins can affect the performance of the report. Executing Class Joins first ensures that data is filtered and joined efficiently before applying more complex Association Rules and Index Joins.
  • Data Integrity: Ensuring the correct order of joins helps maintain data integrity and accuracy in the report results.

By understanding this execution order, you can better design your Report Definitions to optimize performance and ensure accurate data retrieval in Pega.