Page Size

You must specify a Page Size when creating a database, and the page size amount you enter will be stored as bytes.

Firebird or InterBase databases are saved in blocks and each of these blocks are called a page. The smallest administrative unit in a database file is a database page, and database administration essentially involves accessing the hard drive block by block. Theoretically, the more data per access fetched by a single database page, the less frequently a new page needs to be loaded. Practically, depending upon the operating system and server hardware, access to larger database pages can even influence the performance negatively, as 1024 bytes can be loaded quicker than 8192 bytes.

In a database, page sizes can have the following possible values: 1024, 2048, 4096, 8192, 16384, and 32768. The default page size is 8192.

If you specify the database page size as less than 1,024, then it will automatically be rounded up to 1,024. Other values which are not equal to either 1024, 2048, 4096, 8192, 16384, and 32768, will be rounded up to the closest smaller supported value. If the database page size is not specified, it is set to the default value of 8,192.

Choosing a Large or Small Page Size

Bigger isn't always better. Larger page sizes can fit more records in a single page, having wider indexes and more indexes but they will also waste more space for blobs (Binary Large Object - a data type that stores binary data), which means that it increases memory consumption of the page cache.

The database page size has a direct influence on the amount of database cache, which influences all the above points. If a 16 KB page size is specified and the Firebird server's database cache defined in the firebird.conf at its maximum of 128,000 pages, a total of 2 GB cache is made available for holding data pages. The same cache specification with a page size of 1 KB only provides 180 MB cache. (!!!!Please refer to Memory configuration for details of cache specification for the Firebird Superserver and Classic server.!!!!)

Large page sizes may result in some space waste, but given the cost of hardware today, this shouldn't be a major issue and will even improve performance.

How to alter the database page size

(1) Open the database you want to alter the Page Size. Inside the Navigation bar, open up Services and click on Backup Database. Once the tab opens up, click on Start Backup and wait for it finish.

(2) Once the backup is finished, on the navigation bar open up Services again and click on Restore Database.

(3) Change the Page Size as you would like then click on Start Restore.