Athena query timeout

0

Hello, I was running the following query against a bucket to get details related to usage of access key for a particular time period, but my query keeps running into a "query timeout" error. I tried reducing the range of the time event to as low as 30 days but the query did not finish successfully.

SELECT 
useridentity.userName,
eventName,
       eventTime,
       eventSource,
       sourceipaddress,
       awsregion,
       errorcode,
       errormessage,
       requestparameters,
       responseelements,
       eventId
       
FROM <bucket_name>
WHERE eventtime >= '2022-06-23T00:00:00Z'and eventtime < '2022-07-24T23:59:59Z'
AND useridentity.accesskeyid = '<access_key>'

Query Id: ad56a98f-7481-4989-ba6a-1571e51c2ca1

AWS
asked 10 months ago325 views
1 Answer
0

If your Athena query is timing out you can probably optimize your configuration to improve the performance.

Data Format If possible you can improve the performance by using an efficient file format like Parquet or ORC. This will save you time and costs as less data will be queried. https://docs.aws.amazon.com/athena/latest/ug/performance-tuning.html

Partitioning If your dataset is large or changing frequently you can partition your dataset by a specific key like year, month, day, etc. The query will only look at specific partitions that will improve performance and reduce costs. https://docs.aws.amazon.com/athena/latest/ug/partitions.html

Upgrading Athena Engine Overtime AWS releasing newer versions of Athena that will be more optimized. If you're not already using the latest version you can look at upgrading to get the latest benefits seamlessly. https://docs.aws.amazon.com/athena/latest/ug/engine-versions-changing.html

I hope these suggestions help you resolve your issues.

EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions