Setting database block size (BlockSize) and location (FileSpec)
The default block size for the solidDB® database file is 16 KB. The block size is defined in multiples of 2 KB. The minimum block size is 2 KB and the maximum is 64 KB. The maximum size of the database is 64 TB.
The block size is set with the parameter Indexfile.BlockSize. If you want solidDB® to create a database with a different block size, you have to set the Indexfile.BlockSize value before creating a database. If you have an existing database, remember to move the old database (.db) and log files (.log) to another directory; the next time you start solidDB®, a new database is created.
To modify the constant value for the new database, add the following lines in the solid.ini file, providing the size in bytes:
[IndexFile] BlockSize=size_in_bytes
The unit of size is 1 byte (as in all size-related parameters). You can also use the unit symbols of K for KB and M for MB.
After you save the file and start solidDB®, solidDB® creates a database with the new constant value from the solid.ini file.
Similarly, you can also modify the Indexfile.FileSpec parameter to define the following:
▪Name and location of the database files – the default file name is solid.db and the default location is the solidDB® directory
▪Maximum size (in bytes) the database file can reach – the default value is 2147483647, which equals 2 G-1 bytes. The maximum file size is (4 G ‑ 1)*blocksize. With the default 16 KB block size, the maximum is 64 TB ‑ 1.
You can also use the Indexfile.FileSpec parameter to divide the database file into multiple files and onto multiple disks. Multiple database files are useful if you create a large physical database.
For details on configuring the database file locations and sizes with the Indexfile.FileSpec parameter, see Configuring solidDB®.