Skip to main content

Table of Contents

Setting up a declarative index


Only available versions of this content are shown in the dropdown

You can use indexing to improve database performance and facilitate reporting by setting up a declarative index.

As a best practice, do not create declarative indexes for top-level Single Value properties.

To set up a declarative index, perform the following actions:

  1. Identify the property or properties on the source object that will be used for the index instance.

  2. Create a concrete class derived from the Index- base class that will contain the new index instances. For concrete classes derived from the Index- base class, the key consists of three properties pxInsIndexedKey, pxIndexCount, and pxIndexPurpose, in that order.

  3. Determine which database table will hold the new indexes. Create the database table, if necessary, and associate the table with the class using a database table instance. The three key properties must be exposed columns in the table.

  4. Define Single Value properties in the new index class to hold the values of the source instance properties. Confirm that all of these properties are exposed columns in the database, or modify the database schema as necessary.

  5. Choose a name for the Declare Index rule that describes the rule's purpose.

  6. Create a Declare Index rule, recording the source of each property value and its corresponding index property name.

  7. Save the Declare Index rule. Index processing starts immediately.

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us