When you re-run a query in Athena, you can optionally choose to reuse the last stored query result. This option can increase performance and reduce costs in terms of the number of bytes scanned.
Reusing query results is useful if you know that the results will not change within a given time frame. You can specify a maximum age for reusing query results. Athena will use the stored result as long as it is not older than the specified age.
Athena in the search bar at the top of the screen.




Navigate back to the Query editor.
Click the + icon to add a new tab.

Copy and paste the query below into the query editor:
SELECT * FROM default.customers_csv LIMIT 10;
Click the Reuse query results toggle to the off position.
Click the Run button.

Note down the Run time and Data scanned values.

Click the Reuse query results toggle to turn it on.

Click the edit icon (pencil) under Reuse query results.
Set the reuse time to 10 minutes, then click Confirm.

Re-run the query by clicking Run again.
Compare the Run time and Data scanned values with the original run.
Go to the Recent Queries tab in the query editor.
Check the Cache column to see the Result reuse value added to the execution.

Note: You may need to scroll across to find the Cache column.
You have now successfully explored the query results reuse feature in Amazon Athena.