Efficient OR queries

Can somebody expand more on the semantics of OR queries: https://www.cockroachlabs.com/docs/stable/known-limitations.html#query-planning-for-or-expressions

If I query for a > 1 OR b > 1, with appropriate indexes, does this not do 2 simultaneous scans of the a index and b index, both ascending and starting at 1? What if I have a more complicated query that is a long series of
(cond1 AND cond2) OR (cond3 AND cond4) OR ... OR (condN AND condN+1)

Does this become an extremely expensive query, even with appropriate indexes?

If that’s not the case, is there a github issue open to improve this? I can’t seem to find one.

Hey @steeling1,

Currently we have support of multiple indexes using zig zag joins, however this requires that a prefix of the columns in each index have a fixed value (e.g. x=1)

Regarding your more complex queries, in general CRDB does not have very good support for OR predicates, we have a github issue on this topic which can be found here.

Let me know if you have any other questions.

Thanks,

Ron