# Compaction

Glossary, read 10 Nov 2026

**The short answer.** Compaction rewrites many small data files into fewer large ones so queries open fewer files and manifests stay small. Every format needs it: Iceberg through rewrite data files, Delta Lake through OPTIMIZE, Hudi through merge-on-read compaction, and managed services such as Amazon S3 Tables run it for the user on a schedule.

Compaction is a recurring compute cost. Who runs it, on what hardware and how often differs by platform, which is why the maintenance pages on this site compare it directly.

Some services also apply pending row-level deletes during compaction, so it doubles as the step that makes a delete physical.

## A sourced example

Amazon S3 Tables enables compaction by default on every table, with a 512 MB default target file size that you can set anywhere from 64 MB to 512 MB, and it applies row-level deletes as it goes.

## Sources

- Maintenance for tables (Amazon S3 User Guide): https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html (read 10 Nov 2026)

Last reviewed 10 Nov 2026. Canonical: https://datalakehousecompare.com/glossary/compaction/
