I have an expression that does not perform anymore.
The WHERE part of the expression contains an OR-statement over two different tables. This ons also has an IN lookup within each OR, making it even harder to perform.
How can this be optimized and how to avoid these kind of expressions?
The context of this expression is answers
boolean:or([
this.in({
productpropertyanswers,
this.answer,
boolean:and([
this.property.productproperty.type.equals(fixedconfigurable:load(0)),
this.property.product.equals(products:load(504574)),
boolean:not(this.answer.isnull()),
this.property.productproperty.in({
productpropertygroupitems,
this.property,
boolean:and([
this.group.equals(productpropertygroups:load(174)),
boolean:not(this.property.isnull())
])
})
])
}),
this.in({
properties,
this.answer,
boolean:and([
this.product.equals(products:load(504574)),
this.productproperty.type.equals(fixedconfigurable:load(0)),
boolean:not(this.answer.isnull()),
this.productproperty.in({
productpropertygroupitems,
this.property,
boolean:and([
this.group.equals(productpropertygroups:load(174)),
boolean:not(this.property.isnull())
])
})
])
})
])