aladda
Databricks Employee
Databricks Employee
  • The ANALYZE Command specifically captures statistics which are relevant for the Cost Based Optimizer to make better decisions.
  • The 32 columns of statistics that Delta auto-collects are specifically for data skipping. This is separate from the ANALYZE command
  • The reason docs currently say Do not run on Delta tables’ is because Its best to run Analyze on Delta tables after completion of any data update/delete operation and when the data has changed by around 10%. This gives the CBO the best and most up-to-date statistics to work with
  • General best practices:

View solution in original post