Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Optimize WHERE Clause Expressions

In the where clause, ensure that the most selective operators appear first.

For example, suppose you have a query like this:

    select * from /Customer c where c.location = "CA" and c.age > 95

If the number of customers in the dataset whose age is greater than 95 is very small compared to the number of people living in California, then `age > 95` is a more selective operator than `location = "CA"`.

Rewrite the query as follows:

    select * from /Customer c where c.age > 95 and c.location = "CA"

The more selective operator now appears first, so the query is more efficient.

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.