Skip to main content

query_rows_limit_exceeded

Your analytics query attempted to scan more rows than the Unkey limit allows. Add time range filters or WHERE clauses to reduce the scan scope.
1 min read
Danger
err:user:unprocessable_entity:query_rows_limit_exceeded
Example

What Happened?#

Your query tried to scan more than 100 million rows! We limit the number of rows that can be scanned to keep queries fast and prevent resource exhaustion.

This happens when you query large time ranges or don't filter your data enough, causing ClickHouse to scan millions of rows even if the final result is small.

How to Fix It#

1. Add Time Range Filters#

Always filter by time to limit the number of rows scanned:

2. Use More Selective Filters#

Add filters that reduce the data before aggregation:

3. Use Pre-Aggregated Tables#

For historical queries, use aggregated tables that have fewer rows:

4. Query in Smaller Batches#

Instead of one large query, break it into smaller time windows:

Need Higher Row Limits?#

Note

Have a legitimate need to scan more rows? Contact our support team!

Reach out to support and tell us:

  • What you're trying to analyze
  • Why you need to scan more than 100 million rows
  • An example of the query you're running

We'll review your use case and help optimize your query or adjust limits if needed.