Subject | Re: [firebird-support] Database Size |
---|---|
Author | Nick Upson |
Post date | 2006-09-21T11:29:33Z |
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.