OPTIMIZE consolidates the small Parquet files of a Delta table
Optimize performance
AnswerCorrect answer: C - OPTIMIZE consolidates Table1's small Parquet files into larger ones, while VACUUM only removes unreferenced files.
You have a Fabric workspace that contains a lakehouse and a notebook named Notebook1. Notebook1 reads data into a DataFrame from a table named Table1 and applies transformation logic. The data from the DataFrame is then written to a new Delta table named Table2 by using a merge operation. You need to consolidate the underlying Parquet files in Table1. Which command should you run?
100% of anonymous learners picked answer C.
Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
OPTIMIZE is the Delta Lake maintenance command that consolidates small Parquet files into larger ones (ideally 128 MB to 1 GB); VACUUM deletes unreferenced files and never compacts anything.
Running OPTIMIZE on Table1 compacts its many small Parquet files into larger ones, solving the small-file problem; VACUUM only removes files no longer referenced by the Delta log, and BROADCAST and CACHE are query-time hints, not file maintenance.
Confusing OPTIMIZE with VACUUM: VACUUM cleans up old and unreferenced files, while only OPTIMIZE rewrites and consolidates the underlying Parquet files.
Community Discussion (6 comments)
benni_ale👍 1Selected: C
Optimise!
henryphchan👍 2Selected: C
In Delta Lake, the OPTIMIZE command is used to consolidate small Parquet files into larger ones. This improves query performance by reducing the overhead of managing many small files. VACUUM command is used to clean up and remove files that are no longer needed (e.g., old versions of data files, deleted files)
prabhjot👍 2Selected: C
Optimize solves the "small file problem" by consolidating multiple small files into larger parquet files
Tuki93👍 1Selected: C
Optimize: Consolidates multiple small Parquet files into large file. Big Data processing engines, and all Fabric engines, benefit from having larger files sizes. Having files of size above 128 MB, and optimally close to 1 GB, improves compression and data distribution, across the cluster nodes. It reduces the need to scan numerous small files for efficient read operations. It's a general best practice to run optimization strategies after loading large tables.
To consolidate the underlying Parquet files in Table1, you should run the OPTIMIZE command.
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Log in to comment, report an error, or add a note about this question.
Expert Analysis
Why the Answer Is Correct
In Delta Lake, the OPTIMIZE command rewrites a table to consolidate many small Parquet files into fewer larger ones, improving read performance across all Fabric engines. Notebook1's merge writes into Table2, while Table1 needs file compaction, and OPTIMIZE is exactly the command for consolidating Table1's underlying Parquet files.
Why the Other Options Are Wrong
Option A (VACUUM) removes files no longer referenced by the Delta table log; it does not consolidate anything. Option B (BROADCAST) is a join hint that replicates a small table to all executors. Option D (CACHE) materializes data in memory for faster queries; neither touches the on-disk file layout.
Community Comment Notes
The community is unanimous (C 100). GHill1982 (4 likes) states OPTIMIZE consolidates the underlying Parquet files, henryphchan and prabhjot explain the small-file problem, and Tuki93 notes file sizes above 128 MB and optimally near 1 GB improve compression and scan efficiency. doctordodge links the lakehouse table maintenance documentation.