ReserveSize property

UL Ext.: Specifies the reserve file system space for storage of UltraLite persistent data.

Syntax
Visual Basic

Public Property ReserveSize As String
C#

public string  ReserveSize  { get; set; }
Property value

A string specifying the reserve size. The default is a null reference (Nothing in Visual Basic).

Remarks

The values for the reserve size parameter is specified in units of bytes. Use the suffix k or K to indicate units of kilobytes and the suffix m or M to indicate megabytes.

The reserve_size parameter allows you to pre-allocate the file system space required for your UltraLite database without 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.

Note that 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.

The following parameter string ensures that the persistent store file is at least 2 MB upon startup.

connParms.ReserveSize = "2m"
See also