Subject Re: [firebird-support] Why does Firebird write so much data for simple select queries?
Author Doug Chamberlin
On 10/27/11 11:11 AM, dsaunders1971 wrote:
> I have a question about why Firebird writes / or changes so much data in the database file when you run a simple select query.

Two things come immediately to mind:

1) Everything gets read and written to the file system in blocks. So
even if you just update one byte in one record at least one whole block
is read and written. Of course, that is subject to caching, etc, but if
the monitor you are watching is counting bytes you will see lots more
moving around than you might have expected.

2) Everything takes place in a transaction and the server needs to track
transactions so there is housekeeping done to record when transactions
start and stop. This applies to simple transactions that just read data
as well as those that change data. So consider an additional block or
two being read and written for each transaction. (For example, there is
a Transaction Inventory Page which is the most frequently read and
written block in the whole database.)

I'm sure Ann and others will add more to this.