Analyze Temp Table
Enables automatic computation of table statistics on TEMP Tables using the ANALYZE TABLE command to improve query performance.
When enabled, the generated Databricks load code adds ANALYZE TABLE ... COMPUTE STATISTICS after the load of intermediate temp tables in the source and Data Vault load steps. In these steps the statement is added only where the intermediate result is a table. An intermediate result held in a temporary view (see Use Temporary Views) gets no statement.
Delete detection loads on Databricks apply the same setting to their landing, cache and end date temp objects and to the tables that receive the delete records.
When to Change This Setting
Enable it when the later steps of a load read from the temp tables and benefit from fresh statistics. Keep the default N when the extra step per temp table is not wanted.
Related Settings
| Setting | Interaction |
|---|---|
| Analyze Table | The same statistics step for the target tables of the load |
| Optimize Temp Table | The companion OPTIMIZE step for the same temp tables |
| Use Temporary Views | Defaults to Y. In the source and Data Vault load steps, intermediate results held in temporary views are not analyzed |
Notes
- This setting is part of the Databricks Options settings category.
- The default value for this setting is
N.