Sets the bulk-load-secondaries configuration property. By default this
property is false.
This property is true to cause the initial creation of secondary
indices to be performed as a bulk load. If this property is true and
EntityStore.getSecondaryIndex EntityStore.getSecondaryIndex has
never been called for a secondary index, that secondary index will not
be created or written as records are written to the primary index. In
addition, if that secondary index defines a foreign key constraint, the
constraint will not be enforced.
The secondary index will be populated later when the {code
getSecondaryIndex} method is called for the first time for that index,
or when the store is closed and re-opened with this property set to
false and the primary index is obtained. In either case, the secondary
index is populated by reading through the entire primary index and
adding records to the secondary index as needed. While populating the
secondary, foreign key constraints will be enforced and an exception is
thrown if a constraint is violated.
When loading a primary index along with secondary indexes from a
large input data set, configuring a bulk load of the secondary indexes
is sometimes more performant than updating the secondary indexes each
time the primary index is updated. The absence of foreign key
constraints during the load also provides more flexibility.
|