UltraLite Database User's Guide
Connection Parameters
Additional connection parameters
Reserves file system space for storage of UltraLite persistent data.
Interface | Connection parameter |
---|---|
Connection string | reserve_size |
For information about using the connection parameter, see Specifying connection parameters.
Use k or K, m or M to denote kilobytes or megabytes, respectively.
Values can be expressed in kb or mb.
The reserve_size parameter allows you to pre-allocate the file system space required for your UltraLite database without actually inserting any data. Reserving file system space can improve performance slightly and also prevent out of memory failures. By default, the persistent storage file only grows when required as the application updates the database.
Reserve_size reserves file system space, which includes the metadata in the persistent store file, and not just the raw data. The metadata overhead as well as data compression must be considered when deriving the required file system space from the amount of database data. Running the database with test data and observing the persistent store file size is recommended.
The reserve_size parameter reserves space by growing the persistent store file to the given reserve size on startup, regardless of whether the file previously existed. The file is never truncated.
This parameter does not apply to the Palm Computing Platform unless the application uses the Virtual File System (VFS).
Use the reserve_size parameter to pre-allocate space as follows:
"CE_SCHEMA=orders;RESERVE_SIZE=128K"
This example ensures that the persistent store file is at least 128 K upon startup.