- Newest
- Most votes
- Most comments
“Query exhausted resources at this scale factor” indicates that you hit memory limits on the Athena cluster that runs your query. Most commonly, this can be probably as the query doesn’t follow the best practices. New Athena query engine version 3 is now available in most regions - try upgrading to that or to Version 2 (You should see a notification at the top of Athena interface with that information). This issue may sometime be transient and it may go away if you retry. If there are joins the query in the you ran or if you have not partitioned the data, I could try to optimizing it - but this does not seem to be the case here. Check the below items as well:
- How big is your data after compression in the parquet/gzip format? and how is your data accessed? (What the typical WHERE clause elements?).
- Please check if your partition strategy is right for your data, as you have already partitioned by
day
- Try bucketing your data by specifying
CLUSTERED BY (<bucketed columns>) INTO <number of buckets> BUCKETS
- Use the new query stats visualizer (click Query stats next to Query results, then Execution details) to figure out if it shows any errors.
Please refer to this blog for some tuning tips for your query to perform better: https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/
Relevant content
- asked 6 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 months ago