Invalidate Optimizer Statistics Cache
INVALIDATE STATS clears the entire optimizer statistics cache on all SQL Nodes.
If a table has not undergone any row delta after the last statistics cache refresh, the Ocient System does not recalculate statistics by sampling the underlying table. PDF statistics might still change slightly due to non-deterministic union operations. If the table has undergone a row change, the Ocient System recalculates statistics from scratch.
Query performance might be affected until the statistics cache repopulates, specifically for optimization time. For tables that have undergone a row delta, the optimizer temporarily uses the old statistics file again until the recalculated file is available.
Syntax
SQL
SQL
Invalidate All Base Statistics
TheINVALIDATE STATS FILES SQL statement forcibly invalidates the CDE and PDF files of the Foundation Node for all tables regardless of changes in the row delta, which triggers the system to recalculate the statistics.
The optimizer statistics cache continues to use its current value until the Foundation Nodes have finished recalculating the new statistics, after which the cache replaces the table entry with the new statistics. This operation should have minimal impact on query optimization times.
Depending on the size of the system, the system might take minutes to hours to recalculate all statistics on the system fully, and for new statistics to populate in the optimizer cache.
Syntax
SQL
SQL
Invalidate All Base Statistics For a Specific Table
TheALTER table_name INVALIDATE STATS SQL statement forcibly invalidates the CDE and PDF files of the Foundation Node for the specified table, regardless of changes in the row delta, which triggers the system to recalculate the statistics.
The optimizer statistics cache continues to use its current value until the Foundation Nodes have finished recalculating the new statistics, after which the cache replaces the table entry with the new statistics. This operation should have minimal impact on query optimization times.
Syntax
SQL
| Parameter | Data Type | Description |
|---|---|---|
table_name | string | The name of the table. |
test_table.
SQL

