opteryx icon indicating copy to clipboard operation
opteryx copied to clipboard

[OPTIMIZER] Rewrite chains of ARRAY_CONTAINS to list ops (`@>`)

Open joocer opened this issue 3 months ago • 0 comments

Rewriting chains of OR conditions into single operator is a good way to improve query performance.

When users write ARRAY_CONTAINS(x, 1) OR ARRAY_CONTAINS(x, 2) we can rewrite this to x @> (1,2) within the query optimizer. This single faster operation.

joocer avatar Aug 02 '25 10:08 joocer