Database page space utilisation

<< Database startup and shutdown | Firebird Database Housekeeping Utility | Database validation and recovery >>

Database page space utilisation

When a database page is being written to, Firebird reserves 20% of the page for future use. This could be used to extend VARCHAR columns that started off small and then were updated to a longer value, for example.

If you wish to use all the available space in each database page, you may use the -use command to configure the database to do so. If you subsequently wish to return to the default behaviour, the -use command can be used to revert back to leaving 20% free space per page.

Note: Once a page has been filled to 'capacity' (80 or 100%) changing the page usage setting will not change those pages, only subsequently written pages will be affected.

The -use command takes two parameters as follows:

 gfix -use USAGE database_name

The USAGE is one of:

  • full: use 100% of the space in each database page.
  • reserve: revert to the default behaviour and only use 80% of each page.

The following example configures a database to use all available space in each database page:

 linux> gfix -use full my_employee
 linux> gstat -header my_employee | grep Attributes
 Attributes no reserve

The following example sets the page usage back to the default:

 linux> gfix -use reserve my_employee
 linux> gstat -header my_employee | grep Attributes
 Attributes

If you are using full page utilisation then the Attributes show up with no reserve in the text. This doesn't appear for normal 80% utilisation mode.

back to top of page
<< Database startup and shutdown | Firebird Database Housekeeping Utility | Database validation and recovery >>