meta data for this page
  •  

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

  • Small pages are useful if your database runs on a small computer with limited memory. They can also help when your database is used primarily for the retrieval of small pieces of information from random locations. A larger page size helps SQL Anywhere read databases more efficiently.
  • Advantages of having a large page size: Many index-based operations (indices work quicker if the index depth is minimized). Wide records, because with very wide data structures, i.e. with very many and/or very long columns, reading a data set is more efficient. With data sets that do not fit onto one page, several pages have to be read to fetch a single data set. The same applies to writing; ie. fetches across several pages are necessary. Large blob fields, as data is stored and retrieved more efficiently if fewer pages need to be fetched. With larger blobs the writing and reading processes are also more effective, as, for example, 100 accesses are necessary for a 100K blob column with a 1K page size. However with an 8K page size only 13 accesses are required.

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.