Question 508 of 846
Monitor and optimize data storage and processinghardMultiple ChoiceObjective-mapped

Quick Answer

The correct command is `VACUUM delta_table RETAIN 30 HOURS`. This works because the VACUUM command physically removes stale data files that are no longer needed by the Delta table’s transaction log, directly addressing the rapid growth of version history and the resulting query performance degradation. By specifying `RETAIN 30 HOURS`, you override Delta Lake’s default 7-day retention threshold, ensuring that only files older than 30 days are deleted—preserving your ability to time travel to any version within the last 30 days. On the DP-203 exam, this scenario tests your understanding of Delta Lake’s lifecycle management and the trade-off between storage optimization and time travel capabilities. A common trap is confusing `RETAIN 30 HOURS` with `RETAIN 30 DAYS`; remember that the retention period is always specified in hours, so 30 days would require `720 HOURS`. Memory tip: think “VACUUM vacuums up old files, but keep the last 30 days safe by setting hours, not days.”

DP-203 Practice Question: Monitor and optimize data storage and processing

This DP-203 practice question tests your understanding of monitor and optimize data storage and processing. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your team uses Azure Databricks with Delta Lake for ETL. You notice that the Delta table's version history is growing rapidly, and query performance is degrading. You want to retain the ability to time travel for the last 30 days. Which Delta Lake command should you run?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

VACUUM delta_table RETAIN 30 HOURS;

The VACUUM command in Delta Lake removes files older than the specified retention threshold, which directly addresses the rapid growth of version history and performance degradation. By using `VACUUM delta_table RETAIN 30 HOURS`, you delete stale data files while preserving the last 30 days of history for time travel, as Delta Lake defaults to a 7-day retention period but allows custom retention. This command physically deletes unused files, reducing storage and improving query performance.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • DESCRIBE HISTORY delta_table;

    Why it's wrong here

    This command only displays the history of changes, not cleanup.

  • VACUUM delta_table RETAIN 30 HOURS;

    Why this is correct

    VACUUM removes files older than the retention period; 30 hours is a typo but the correct command is VACUUM with retention in hours; default is 7 days. To keep 30 days, set retention to 720 hours.

    Related concept

    Read the scenario before looking for a memorised answer.

  • OPTIMIZE delta_table;

    Why it's wrong here

    OPTIMIZE compacts small files into larger ones but does not delete historical data.

  • FSCK REPAIR TABLE delta_table;

    Why it's wrong here

    This command recovers missing files in the table directory but does not remove old versions.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse VACUUM's retention parameter with days instead of hours, or they mistakenly choose OPTIMIZE thinking it cleans up history, when in fact it only compacts files without removing old versions.

Trap categories for this question

  • Command / output trap

    This command only displays the history of changes, not cleanup.

Detailed technical explanation

How to think about this question

Under the hood, VACUUM uses the Delta transaction log to identify files that are no longer referenced by any table version within the retention window, then deletes them from the underlying file system (e.g., ADLS Gen2 or S3). A subtle behavior is that VACUUM by default retains 7 days (168 hours), so specifying 30 HOURS (not days) is a deliberate trap—candidates must carefully read the unit. In real-world scenarios, if you set retention too low (e.g., 0 hours), you lose time travel capability entirely, which can break audit or rollback requirements.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DP-203 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DP-203 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DP-203 question test?

Monitor and optimize data storage and processing — This question tests Monitor and optimize data storage and processing — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: VACUUM delta_table RETAIN 30 HOURS; — The VACUUM command in Delta Lake removes files older than the specified retention threshold, which directly addresses the rapid growth of version history and performance degradation. By using `VACUUM delta_table RETAIN 30 HOURS`, you delete stale data files while preserving the last 30 days of history for time travel, as Delta Lake defaults to a 7-day retention period but allows custom retention. This command physically deletes unused files, reducing storage and improving query performance.

What should I do if I get this DP-203 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DP-203 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-203 exam.