#include <db.h> int DB_ENV->set_ext_file_threshold(DB_ENV *dbenv, u_int32_t bytes, u_int32_t flags);
The DB_ENV->set_ext_file_threshold()
method sets
a default size for the environment which is used to determine when
a data item will be stored as an external file. Data items sized less
than this threshold are stored as normal data within the database. Data
items larger than this size are stored on-disk in a subdirectory
set aside for the purpose.
If this threshold value is set to 0
, then external
file support is turned off by default for databases created in the
environment. If this method is never called, then the default external
file threshold is 0
.
This method only sets the default external file threshold for the environment. The external file threshold can be set for individual databases created within the environment using DB->set_ext_file_threshold() .
This method configures operations performed using the specified DB_ENV handle, not all operations performed on the underlying database environment.
You may call this method at any time after the DB_ENV handle has been created.
Unless otherwise specified, the
DB_ENV->set_ext_file_threshold()
method returns a non-zero error value on failure and 0 on success.
The bytes parameter identifies the threshold size, in bytes, beyond which a data item is stored as an external file.
The DB_ENV->set_ext_file_threshold()
method may fail and return one of the following non-zero errors: