Subject RE: [firebird-support] Database Size
Author Priebe, Joern (GE Indust, Security)
Database header page information:
Flags 0
Checksum 12345
Generation 3714
Page size 8192
ODS version 10.1
Oldest transaction 156
Oldest active 1793
Oldest snapshot 1790
Next transaction 3708
Bumped transaction 1
Sequence number 0
Next attachment ID 0
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 3
Creation date Sep 14, 2006 12:06:21
Attributes force write

Variable header data:
Sweep interval: 20000

-----Original Message-----
[]On Behalf Of Nick Upson
Sent: Donnerstag, 21. September 2006 13:30
Subject: Re: [firebird-support] Database Size

Please show the output from gstat -h for this database

On 21/09/06, Priebe, Joern (GE Indust, Security) <Joern.Priebe@...> wrote:
> Hello Folks,
> I have (hopefully) an easy question concerning a database's size.
> To make it simple: I have a Firebird Database (Pagesize 4096) with some Tables all linked by a foreign key to a Main-Table. On the Main-Table I created a Trigger "BEFORE INSERT" which deletes all records older than a certain time. So after after inserting records at a certain time, this trigger deletes all obsolete records.
> I checked the Database with my DB Tool IBExpert and it shows me that the count of total records in the whole Database keeps constant after a certain time, which proofs that the trigger works fine.
> But I am very confused that the Database-Size (and allocated Pagesizes) stills increases - even after a long time where the trigger was working. Only a Backup/Restore shrinks it to a lower (expected) size. I know that the physical size of my database won't lower unless I start a backup and restore, but why are the pages with deleted records are "refilled" again? (Or if it so, how can I check it?)
> My Sweepcount is 20000 and I am not using any BLOBS fields if this may be from interest.
> I hope you can help me out or can give me some thoughts about this problem, because I need to keep my Database-Size constantly.


Visit and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at


Yahoo! Groups Links