Configuring automatic ANALYZE after LOAD HADOOP

You can change the behavior of the ANALYZE command after a LOAD HADOOP statement by setting the biginsights.stats.auto.analyze.post.load property to ONCE, DEFERRED, NEVER, or ALWAYS, either as a session variable or as a system-wide property. The default value of biginsights.stats.auto.analyze.post.load is ONCE.

Before you begin

These four values have the following definitions:
ONCE
Specifies that ANALYZE is to be run after a load operation completes if an ANALYZE command has never been run against the specified table. This is the default.
DEFERRED
Specifies that ANALYZE is to be queued to run later if an ANALYZE command has never been run against the specified table.
NEVER
Specifies that ANALYZE is never to be run after a load operation completes.
ALWAYS
Specifies that ANALYZE is always to be run after a load operation completes.

Procedure

To set the biginsights.stats.auto.analyze.post.load property as a session variable, complete the following step:

  1. Run the following command within the Db2® Big SQL shell or interface:
    SET HADOOP PROPERTY biginsights.stats.auto.analyze.post.load=ALWAYS;

To set the biginsights.stats.auto.analyze.post.load property as a system-wide property, complete the following steps:

  1. Open the bigsql-conf.xml configuration file at $BIGSQL_HOME/conf/bigsql-conf.xml on the head node only.
  2. Add the following property:
    
    <property>
     <name>biginsights.stats.auto.analyze.post.load</name>
     <value>ALWAYS</value> 
    </property>
  3. Restart the Db2 Big SQL service.