Checking table health and maintenance
Amazon Athena performs managed maintenance on your tables, including compaction, snapshot management, and unreferenced (orphan) file removal. You can use Amazon S3 Storage Lens for Tables to confirm that maintenance is configured, running, and succeeding.
- Check maintenance settings (free tier)
-
The Summary tab shows whether compaction, snapshot management, unreferenced file removal, and trim are enabled, along with their retention settings.
- Track non-current storage
-
If non-current file storage bytes keep growing, expired files may not be removed. Check whether snapshot management and unreferenced file removal are running and succeeding.
- Compaction (advanced tier)
-
On the Maintenance tab, use the compaction count for the last 24 hours, the success rate, and the compaction history to confirm that compaction runs regularly and succeeds. The compaction error count and the latest compaction job error status show failures.
- Snapshot management (advanced tier)
-
The snapshot management metrics show how many data, delete, manifest, manifest list, and statistics files snapshot expiration removed. The snapshot management error count shows failed jobs.
- Unreferenced file removal (advanced tier)
-
The unreferenced files deleted count shows how many unreferenced files were removed in the last 24 hours. The unreferenced file removal error count shows failed jobs.
- Metadata and manifest read errors (advanced tier)
-
The metadata file error count and manifest file error count identify tables whose metadata couldn't be read, which can result in missing metrics for those tables.
The compaction history includes the 100 most recent compaction events in a 24-hour period. Depending on when metrics are collected, an unreferenced file removal or snapshot management job might not appear in a given daily report. When this happens, it appears in the next report.