DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

Apache Iceberg Compaction: How to Verify Query Performance

Apache Iceberg compaction can help metadata-heavy queries, but a smaller file count is not proof of faster performance. Here’s how to evaluate a rewrite.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Compacting Apache Iceberg data files can reduce metadata overhead and the cost of opening many small files, but a reduction from 1,000 files to 6 does not by itself prove that queries became faster. The specific 1,000-to-6 result has not been verified here, and compaction can help some workloads while slowing others. To judge the outcome, compare the same queries before and after and report what files were rewritten, not just the new file count.

What compaction changes—and what the file count does not tell you

Iceberg’s Spark rewriteDataFiles action combines small data files into larger ones. The intended benefits are less manifest metadata to manage and lower runtime file-open costs, as Apache Iceberg explains in its maintenance documentation. Fewer files may therefore help, but the change in file count is not a query benchmark.

As an Amazon Associate I earn from qualifying purchases.

“1,000 files into 6” could describe every file in a table, files in one partition, or only the files selected for rewriting. It could also mean six files were added by the rewrite, rather than that the entire table now contains six files. Iceberg’s Spark procedure reports rewritten and added data-file counts and rewritten bytes; those values should not be conflated with the total table file count. The Spark procedure reference documents the procedure’s outputs.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why performance may improve—or get worse

Metadata- and file-open-heavy queries

Queries that spend a substantial share of their time planning around metadata or opening many small files may benefit from a more consolidated layout. That is the mechanism Iceberg describes; the size of any improvement depends on the table, query, engine, and environment.

Broad scans and aggregations

Compaction can change how work is divided among tasks. A 2026 study by Jannic Cutura and Subash Prakash reports that, in its benchmark, metadata-heavy queries benefited while full-scan aggregations could slow as compaction reduced task parallelism. This is a result from the authors’ setup, not a universal rule for Iceberg tables. The paper simulated 2,376 Iceberg tables and used 96 TPC-H tables for cross-schema validation; its reported model metrics do not establish the outcome of a particular compaction run. See the 2026 study.

Selective queries and broad queries are different tests

A selective query may read only a small part of a table, while a broad aggregation may need to scan most of it. Evaluate those patterns separately: a rewrite that changes planning overhead or task parallelism can affect them differently. A single query or one elapsed-time number cannot establish a general performance result.

How to verify a 1,000-to-6 result

A credible comparison needs the same workload before and after compaction, plus enough detail to tell whether the physical work changed. Record:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • What the counts mean: total table files, files in a named partition, or files selected and added by the rewrite.
  • The table’s size, format, partitioning or layout, and data-file size distribution before and after.
  • The query text and workload type, including whether it is metadata-heavy, selective, or a full-scan aggregation.
  • The query engine and exact version, storage environment, cache state, and concurrency.
  • The compaction strategy and options, including target file size and the scope of the rewrite.
  • Repeated before-and-after timings, with planning time separated from execution time when possible.
  • Files read, bytes scanned, and task counts, alongside elapsed time, to show whether the query did less work or ran with different parallelism.

Without those measurements, the defensible conclusion is limited: the file layout became more compact if the rewrite counts confirm that, but the effect on query performance remains unestablished.

Choose and configure the rewrite for the deployed version

Spark

The current Iceberg Spark procedure reference documents rewrite_data_files with binpack as the default strategy and sort as an option for specified orderings, including Z-order and Hilbert. It documents a 512 MB default target when the value is inherited from the table’s write.target-file-size-bytes property, a minimum rewrite size of 75% of target, and a maximum of 180%. These are documented defaults, not a universal target recommendation; check the Iceberg release and table properties actually in use.

Iceberg’s maintenance page illustrates a Spark rewrite using a 500 MB target and describes the files metadata table as a way to inspect data-file sizes and decide whether partitions need compaction. That example is guidance, not a guarantee that 500 MB—or any other size—is right for a particular workload.

Flink

Iceberg’s Flink maintenance documentation also describes a RewriteDataFiles action and shows an example using a 256 MiB target and 32 MiB minimum. Confirm that the API and options are available in the installed Iceberg release before relying on them: Flink maintenance documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When manifest maintenance is the separate issue

Data-file compaction and manifest rewriting address related but distinct parts of performance. Manifests and manifest lists help Iceberg plan scans and prune data; rewriting manifests can reorganize metadata when write patterns do not align with query filters. If planning is the bottleneck, compacting data files alone may not address it. Iceberg documents manifest rewriting as a separate maintenance path in its maintenance guide and Spark procedures reference.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.