Clarification Needed: COMPUTE STATISTICS vs COMPUTE DELTA STATISTICS on Delta Tables

Sainath368
Contributor

Hi everyone,

I’m trying to understand the difference between the two commands in Databricks:

  • ANALYZE TABLE <table_name> COMPUTE STATISTICS

  • ANALYZE TABLE <table_name> COMPUTE DELTA STATISTICS

Specifically:

  1. What exactly does each command do, and how do they differ, especially in the context of Delta Lake tables?

  2. How often is it recommended to run COMPUTE STATISTICS for optimal query performance and maintenance? For example, is running it every week a good practice, or is that unnecessary overhead?

Thanks in advance for any insights or recommendations!