Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Use Indexing for More Efficient Cache Queries

You can index concept and event properties to make searches faster. Use of indexing avoids the need to deserialize the entire object before running the filter—indexing is of greatest value with large objects that have many properties.

You can index more than one of an entity type’s properties. When indexing is used, memory use will also increase.

The efficiency of a filter is increased when you index the properties that are used in the most selective operators (see Optimize WHERE Clause Expressions for details).

The cache provider, however, may or may not use the index, depending on how complex the filter is. Complex `where` clauses containing function calls and joins will not be optimized. Only simple filters, such as `age > 60`, or `name in (“a”, “b”, “c”)`, are re-written to use indexes.

For example, indexing the `age` property for the Customer concept would make the following search more efficient:

    select * from /Customer c where c.age > 95

However, indexing would not work for a more complex expression such as the following:

    select * from /Customer c where /MyFunctions/roundup(c.age) > 95

You can create the indexes using index catalog function or domain object override.

## To Enable Query Optimization

Only query agents enabled for query optimization use this feature. In the project CDD file, add the following property to the query agent properties:

    be.agent.query.enable.filter.optimizer=true

Only agents with this property set to true will attempt to use indexing that you define.

Subtopics

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.