How do I resolve the "Query exhausted resources at this scale factor" Athena query error?
2 minute read
0
I ran an Amazon Athena query and received the "Query exhausted resources at this scale factor" error message.
Resolution
When the demands of the query exceed the resources that are available to the cluster that ran the query, you receive the following “out of resource" error:
Use EXPLAIN and EXPLAIN ANALYZE to analyze complex queries. The EXPLAIN statement shows the logical or distributed execution plan of a specified SQL statement. The EXPLAIN ANALYZE statement shows both the distributed execution plan of a specified SQL statement and the computational cost of each operation in your query.
If you use EXPLAIN and EXPLAIN ANALYZE statements, then take the following actions:
Make sure that your partition filtering works.
Verify that pushdown works. For more information, see Pushdown on the Trino website.