Enabling or disabling cumulative statistics collection
The default behavior of the ANALYZE TABLE statement is to keep previously collected statistics. You can change this behavior by setting the biginsights.stats.cumulative property to true or false (default value is true), either as a session variable or as a system-wide property.
Procedure
If
there were significant changes to the Datalake table data, it might be better to turn off cumulative
stats before gathering the new statistics to prevent out-of-date column statistics from persisting.
To set the biginsights.stats.cumulative property as a session variable or as a
system-wide property, complete the section of steps that is appropriate for your use case:
To set the biginsights.stats.cumulative property as a session variable:
- Run the following command within the Db2® shell or
interface:
SET HADOOP PROPERTY biginsights.stats.cumulative=false;
To set the biginsights.stats.cumulative property as a system-wide property:
Note: Making this a global setting affects ALL of the ANALYZE TABLE statements.
- Run the following command within the Db2 shell or
interface:
CALL SYSHADOOP.SET_Datalake_CONFIG('BIGSQL', 'biginsights.stats.cumulative', 'false');