err:user:unprocessable_entity:query_rows_limit_exceededdetail says which.
Example response
Likely causes
- The query scans too much: a wide time range, few filters, or raw rows instead of an aggregate.
SELECT, including subqueries, gets a LIMIT at the cap, and a larger LIMIT you write is lowered to it. You’ll usually hit the 4 MiB result size first, which returns query_memory_limit_exceeded.
How to fix
- Narrow the time range.
- Filter on key ID, identity ID, namespace, or another indexed column.
- Aggregate instead of selecting raw rows.
- If you need every row in a large range, split it into smaller windows and run one query per window.
Related errors
err:user:unprocessable_entity:query_memory_limit_exceeded: the query used too much memory or the result was too large.err:user:unprocessable_entity:query_execution_timeout: the query ran too long.err:user:bad_request:query_range_exceeds_retention: the time filter reaches past the retention window.