I want to be able to query two columns to see if either one has the data I am looking for.
Here is the query I am trying to run:
meta(cd).id AS metaId,
ARRAY_SORT(cd.tokens) AS tokens
FROM app cd USE KEYS [(
SELECT RAW meta().id
WHERE type = “myType” AND (col1 OR col2 IN [‘00124’,‘00126’,‘00131’])
ORDER BY meta().id ASC
LIMIT 1000 OFFSET 0 ) ]
This is very slow when I add both columns in using the OR.
When I run this query for just col1 or just col2 without the OR it is very fast.
Is there a way to write this query that is more performant?