# I Compacted 1,000 Apache Iceberg Files Into 6. Here's What Happened to Query Performance.

DevFeed: [I Compacted 1,000 Apache Iceberg Files Into 6. Here's What Happened to Query Performance.](<https://devfeed.tech/articles/i-compacted-1-000-apache-iceberg-files-into-6-here-s-what-happened-to-query-performance-61849.md>)

Original publisher: [Read original article](<https://towardsdatascience.com/i-compacted-1000-apache-iceberg-files-into-6-heres-what-happened-to-query-performance/>)

Author: Thomas Reid

Published: 2026-09-29T15:30:01Z

Content type: tutorial

Language: en

Sources: [Towards Data Science](<https://devfeed.tech/sources/towards-data-science.md>)

Topics: [Apache Iceberg](<https://devfeed.tech/topics/apache-iceberg.md>), [parquet](<https://devfeed.tech/topics/parquet.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [database-optimization](<https://devfeed.tech/topics/database-optimization.md>)

Tags: [apache-iceberg](<https://devfeed.tech/tags/apache-iceberg.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [data-analyitcs](<https://devfeed.tech/tags/data-analyitcs.md>), [data-engineering](<https://devfeed.tech/tags/data-engineering.md>), [iceberg](<https://devfeed.tech/tags/iceberg.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-evaluation](<https://devfeed.tech/tags/performance-evaluation.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This tutorial examines whether compacting 1,000 small Apache Iceberg files into six larger files improves query performance. It describes the small files problem, Iceberg's rewrite_data_files procedure, and a local benchmark using three SQL workloads before and after compaction. The source notes that the local setup cannot reproduce the massive datasets used in real-world systems.

## Source excerpt

Benchmarking the impact of fewer, larger files across three SQL workloads The post I Compacted 1,000 Apache Iceberg Files Into 6. Here's What Happened to Query Performance. appeared first on Towards Data Science.