I have two queries I need to execute, which are identical except for the limit which is offset slightly. They look something like
FOR u IN users
FILTER u.id == "ID"
SORT u.score DESC LIMIT 5
RETURN u
only the second one is offset (e.g. LIMIT 20, 3
) from the first. When I profile these queries separately, they're running at 0.2 ms. But when I try to combine them into one query using sub-queries, it slows down tenfold to 2 ms (one sub-query is 0.5 ms, other is still 0.2 ms). I've been doing something like
RETURN APPEND(subquery_1, subquery_2)
is there some problem with how I'm combining these or are sub-queries just slower?