Subject | Re: Size limit for db |
---|---|
Author | pcmilhouse |
Post date | 2011-06-07T06:50Z |
My system is in java and it has to save every day several diagnostic data on a log table.
If you confirm that when I delete records, firebird reuses that space for next record adding, I can solve my problem deleting automatically the table for old logs.
I can't use a bigger disk because it's an embedded system, and also with a bigger disk after some time I will reach the size limit continuing to add record.
If you confirm that when I delete records, firebird reuses that space for next record adding, I can solve my problem deleting automatically the table for old logs.
I can't use a bigger disk because it's an embedded system, and also with a bigger disk after some time I will reach the size limit continuing to add record.
--- In firebird-support@yahoogroups.com, Ann Harrison <aharrison@...> wrote:
>
> On Mon, Jun 6, 2011 at 9:12 AM, pcmilhouse <pcmilhouse@...> wrote:
> > I would like to limit the size of my firebird db. Is it possible?
>
> Not gracefully. When Firebird tries to allocate a page and fails, all
> connections
> will get a fatal error. Not only that, but you can get into a
> situation where you
> don't have enough space to delete records. In MVCC, a delete is actually
> a special case of an update, where the new record is just a header with a
> flag saying the record was deleted. When you don't have room for those
> deleted "stubs", you're really stuck. Maybe you could drop an index and
> reuse that space.
> >
> > The system is installed in a PC with limit size for HD (for example I can allocate only 5 GB for Database). How can I limit the file to not encrease more than 5 GB?
> > Obviuosly I periodically delete record in table to save space, but the only way I found to decrease db size is to export and import it through gbak. I would like to do it without disconnect my application to db?
> >
>
> Don't worry about the backup/restore. Firebird will reuse the space that
> had been occupied by deleted records automatically. The backup/restore
> will reduce the number of transaction inventory pages, but they're rarely
> an issue.
>
> I guess I've got to ask "why?" A quick search turned up a 2Tb external
> hard drive for $100. Slower than an internal drive, I guess, but with lots
> of room for expansion. Or you could get a 16Gb thumb drive for $25.
>