Subject | Re: [firebird-support] Database file size |
---|---|
Author | Aage Johansen |
Post date | 2004-01-31T23:40:02Z |
On Sat, 31 Jan 2004 19:04:57 +0000 (UTC), drstanl wrote:
the 'discrepancy'.
Other than that: the database may contain some 'garbage' - record versions
that may (or may not yet) have been "garbage collected". Depending on how
the database was created (filled), some space may have been reserved, used,
freed - it will be reclaimed for other use later on.
Do a backup+restore, and see if the size has changed - this is the only way
that will reduce the size of a database.
--
Aage J.
> I have been evaluating Firebird for a client. They rejected it becauseThe estimated record size is slightly off, which may account for some of
> the file size was too large.
> It *does* seem rather large. I'm wondering if anybody can tell me why.
>
> Firebird 1.0.3 on Windows 98 se.
>
> File size Situation
> ------------- -------------------
> ~500,000 Database, empty.
> ~650,000 Database with empty table.
> 1,758,031,872 Table with 16,947,365 records.
>
> Table definition:
>
> CREATE TABLE T1 (
> ID1 VARCHAR(12) NOT NULL,
> ID2 VARCHAR(4) NOT NULL,
> D1 INTEGER NOT NULL,
> D2 INTEGER NOT NULL,
> V1 DOUBLE PRECISION,
> CONSTRAINT PK_T1
> PRIMARY KEY (ID1, ID2, D1, D2) );
>
> Thus, a record is 24 bytes, the fields for the PK comprise 20 bytes, but
> the database averages some 103 bytes per record (after dropping the
> 650,000 bytes of the empty database and table).
>
> This per-record overhead seems significant, and affected my client's
> decision. Not that it would matter to them, but I'd like to understand
> how Firebird produces this result.
the 'discrepancy'.
Other than that: the database may contain some 'garbage' - record versions
that may (or may not yet) have been "garbage collected". Depending on how
the database was created (filled), some space may have been reserved, used,
freed - it will be reclaimed for other use later on.
Do a backup+restore, and see if the size has changed - this is the only way
that will reduce the size of a database.
--
Aage J.