What is a Page?

What happens when you execute a statement? For example:

select name from customers

To get you the customer’s names Firebird will need to read some data from the database file, process this data and then return the results to you.

Now let’s forget the part where Firebird is processing the statement and focus on the part where it is reading data from disc. When I say "reading data" I’m actually saying "reading bytes". Maybe a few bytes maybe thousands of Megabytes.

Inside the database file these bytes are grouped in larger structures called Pages.

Each page contains an arbitrary number of bytes. This number is called Page Size. You may choose a page size among the options given by Firebird. For example 4KB and 8KB are common choices.

What does Firebird keep in those pages? Everything! From transaction progress to table structure and of course the table contents.

Every page has a well defined role. There are pages to store indices, tables, transactions, blobs and others. Index pages only store index-related data. Pages for a specific table only store data for that specific table. And so on.

See this simplified diagram of how a Firebird database file looks divided in pages:

 Firebird Database Page Layout 

 

 


more Firebird articles

Sinática Blog

 


Author

My name is Douglas Tosi. I’m the person ahead of Sinática, a company created to make your software more efficient.
Our first product, Sinática Monitor for Firebird, helps you optimize Firebird SQL databases.