diff --git a/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java b/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java
index <HASH>..<HASH> 100644
--- a/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java
+++ b/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java
@@ -251,8 +251,8 @@ abstract class BinaryOperatorEntityIterable extends EntityIterableBase {
     }
 
     private static boolean shouldBinaryOperationBeCached(@NotNull EntityIterableBase iterable1, @NotNull EntityIterableBase iterable2) {
-        return (iterable1.canBeCached() || iterable1.getHandle().getType().isPropertyIndex()) &&
-               (iterable2.canBeCached() || iterable2.getHandle().getType().isPropertyIndex());
+        return (iterable1.getHandle().getType().isPropertyIndex() || iterable1.canBeCached()) &&
+            (iterable2.getHandle().getType().isPropertyIndex() || iterable2.canBeCached());
     }
 
     private static boolean isOrderOk(@NotNull final EntityIterableHandle handle1,
canBeCached() is too heavy for PropertyRangeOrValueIterableBase