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, and never to the temp tables that end date a Satellite (see End Date Satellite) or to the temp table that stages a Staged Object. 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 key table and to the tables that receive the delete records, and, with Use Temporary Views off, to their cache temp table and to the temp tables that end date the Persistent Staging Area, but not to the temp tables that end date a Satellite.
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.