Subject Re: [firebird-support] 2GB single table limit
Author Ann W. Harrison
Bogusław Brandys wrote:
>
> I know that single table limit is quite low ;-) (40GB - 80 GB depending
> on table record size).

Sheesh.... I remember when a gigabyte was considered a lot of data. As
an aside, blobs don't count (much) in that calculation.

> I have database with two tables storing document
> headers and details. I think that detail table could reach this limit
> during year or two. I suppose that it's not a problem because FB 2.0
> should became stable sooner ,

Heaven help us if it doesn't...

> but I'd like to know if splitting database
> over multiple files could help. Does Firebird balance table fill
> spreading over multiple files in such case ?

No, it doesn't. But since you asked nicely, let me explain a bit
further. Every record is identified by a db_key, which is eight bytes
and defined to be opaque to external applications. Inside - where
you're not supposed to see - before Firebird 2, the number is four bits
of relation (aka table) id, and four bytes of record number.
Theoretically that would translate to a limit of 2**32 records per
table, but the record number space is not dense. Starting a new file
doesn't restart page numbers or record numbers - so it doesn't expand
the number of records that can be stored. Firebird 2 uses 40 bits for
the record number.