Skip to main content


Sets the statistics auto-build variable to the argument specified. For examples, see Examples.

bSQL Syntax Conventions


AUTO BUILD { database_name.blockchain_name | blockchain_name } = <boolean>

<boolean> ::=
{ 0 | 1 | TRUE | FALSE }


Is the name of the database in which the target blockchain persists.

The name of the blockchain to set the auto-build boolean.


MANAGEMENT permission required on the target blockchain.

MANAGEMENT permissions default to members of the admin and developer fixed database roles. Members of the admin role can transfer permissions to other users.

Best Practices

Auto-build determines if stats should be updated internally, i.e built when the blockchains record count reaches a certain threshold. Turn auto build-off when doing a large bulk insertion into a blockchain that has stats. This will keep the system from building statistics multiple times for the same insertion. The user can build stats manually using the BUILD STATS command when the insertion has finished and turn auto-build back on. For more information on bSQL statistics refer to the stats overview.


  • Setting auto-build will error if the target blockchain doesn't have stats.


The following example turns off auto build in the pricing blockchain in the demo database,

AUTO BUILD financial.pricing = FALSE

See Also