Skip to main content

Optimize Table

Enables the OPTIMIZE command to compact small files into larger ones, reducing read overhead and improving query performance.

When enabled, the generated load processes append OPTIMIZE for the target table after the load completes. This applies across the layers: staging, persistent staging, and the Data Vault loads.

When to Change This Setting

Keep the default N when file compaction is handled by the table properties (the default table properties enable Delta auto-optimization) or by scheduled maintenance. Enable it when loads produce many small files and you want compaction to run as part of each load.

SettingInteraction
Analyze TableThe companion post-load statistics step
Table PropertiesThe default properties already enable Delta auto-optimization on write

Notes

  • This setting is part of the Databricks settings category.
  • The default value for this setting is N.