OPTIMIZE plus VACUUM minimizes query time on a table of 2,000 one-MB files

Optimize performance
Answer Correct answer: C - OPTIMIZE consolidates the 2,000 one-MB files and VACUUM removes the unreferenced old files, minimizing Table1 query time.

You have a Fabric workspace that contains a lakehouse named Lakehouse1. Lakehouse1 contains a Delta table named Table1. You analyze Table1 and discover that Table1 contains 2,000 Parquet files of 1 MB each. You need to minimize how long it takes to query Table1. What should you do?

  1. Disable V-Order and run the OPTIMIZE command.
  2. Disable V-Order and run the VACUUM command.
  3. Run the OPTIMIZE and VACUUM commands. Correct Answer

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The small-file problem is fixed by OPTIMIZE; VACUUM cleans up the files OPTIMIZE leaves unreferenced. Keeping V-Order (on by default) preserves the optimized file layout that speeds reads.

Table1's 2,000 Parquet files of 1 MB each create a small-file problem: OPTIMIZE consolidates them into fewer large files for faster scans, and VACUUM then removes the old unreferenced files, minimizing how long queries take.

Disabling V-Order as part of the fix; V-Order improves read performance and is enabled by default, so disabling it would degrade queries rather than speed them up.

Community Discussion (3 comments)

GHill1982 👍 7 Selected: C
OPTIMIZE: This will help compact the small Parquet files into larger files, improving the efficiency of queries. VACUUM: This will remove old versions of files that are no longer needed, freeing up storage and further optimizing performance.
prabhjot 👍 2 Selected: C
Optimize command solves the "small file" problem and the "VACUUM" command erases the older versions of the parquet files thus optimizing on storage and better readability
Tuki93 👍 2 Selected: C
Provided answer C is correct

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.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

With 2,000 Parquet files of 1 MB each, every query against Table1 must open thousands of tiny files. Running OPTIMIZE compacts them into fewer, larger files, dramatically reducing scan overhead, and running VACUUM afterwards deletes the old files no longer referenced by the Delta log. Together they minimize query time on Table1.

Why the Other Options Are Wrong

Options A and B both disable V-Order first, which is counterproductive: V-Order is enabled by default and optimizes the Parquet layout for fast reads, so disabling it hurts performance. Option B also uses VACUUM alone, which removes unreferenced files but never consolidates the live small files.

Community Comment Notes

The community is unanimous (C 100). GHill1982 (7 likes) explains OPTIMIZE compacts the small files while VACUUM removes old unneeded versions, and prabhjot (2 likes) echoes the same pairing for storage efficiency and readability.

Official Reference

Related Analysis

← Back to DP-700 Study Guide