0

I'd like to take advantage of short circuiting the OR in an Orient's SQL query I'm writing. Does Orient's OR short circuit and does it evaluate its terms from left to right or right to left?

4

1 回答 1

1

OrientDB WHERE 条件评估在编写时并未完全执行,因此您不能 100% 依赖 OR 操作短路。

在 V 2.2 中,执行计划器尝试做一些简单的假设并首先评估索引条件,然后它将从左到右评估表达式。

在下一个 V 3.0 中,执行计划程序要复杂得多,并且可以完全重写 WHERE 条件以提高查询效率,因此通常不应依赖短路

于 2017-01-20T08:23:08.523 回答