Subject RE: [IBDI] database capacity
Author Ann Harrison
Questions about capacity have two answers - theoretic and
tested. To the best of my knowledge, no one has tested the
any of the David Begley asks about. In addition to being
theory and likely to be optimistic in practice, the theoretic
limits of InterBase are hard to calculate.


> From: David J N Begley [mailto:d.begley@...]
>
>- maximum size of database
>- measured either in total number of tables

The number of tables is limited by the size of the relation_id, which
is 32 bits.

> or just maximum raw data capacity

The raw data capacity is limited by the maximum size of a file (in
dispute, but either 2 or 4 GB) and the maximum number of files which
is limited by the sequence number, an unsigned short. Among the
things I hope never to do is to handle a database with tens of
thousands of component files.

Since one of the projects on the near horizon is to change the
size of the file pointer from 32 to 64 bits, the potential size
of a single file is due to rise.

> > - maximum size of one table
> > - measured in raw data capacity
> > - documented limit is 32TB

The raw data capacity in a table is the raw capacity of the
database, less the database overhead ... which varies with
the page size, the row size, indexes, etc. Between 3 and 10%.

> > - maximum number of rows per table
> > - documented limit is 4G rows (could this also be expanded to give the
> > real number as "giga" could mean either 4,294,967,296 or
> > 4,000,000,000)

Here we get into really murky waters. The number of rows per table is
limited by the size of a db_key, which is eight bytes for a base table.
However, of those eight bytes, the top four are reserved for the relation
id. The other four bytes are divided between the pointer page number,
the pointer page offset, and the data page line number. The amount of
space allocated to each depends on the page size.

What that means, in sum, is that you've got 32 bits of potential
record ids within a table, but the space is not dense.

Note that all these limits are theoretic, could theoretically be
changed, and in practice there are probably other, lower, limits.
Again, subject to change.

> >
At 09:24 PM 8/28/00 +1000, Bill King wrote:
>i found a telling point here the other day on maximum size of fields usable
>in an index, two 255 char fields and i couldn't create the index, yet two
>200 char fields it would let me...

Right. The index key length is described in a byte and the actual
key length is, potentially, larger than the length of the key field
for compound keys and keys in other than the default collating
sequence. Again, that's a limit that can be changed.

Regards,

Ann

InterBase is a registered trademark of Inprise Corporation.