Updated June 27, 2023.
Database Limits
Item | Actual for Firebird 4.0 |
Maximum size of database | 128 TB (232 x page size) |
Maximum number of tables | 32,768 |
Maximum size of one table | ~18 TB |
Maximum size of external table file | Unlimited |
Maximum number of rows per table | < 240 |
Maximum row size | 64 KB |
Maximum database page size | 32 KB |
NOTE: Page size (PAGE_SIZE) can be 4096, 8192, 16384 or 32768. | |
Maximum number of columns per table | Depends on data types used. (Example: 16,384 INTEGER (4-byte) values per row.) |
NOTE: 8-byte ID is stored for each BLOB or ARRAY reference; size of BLOB or ARRAY data is not counted in row size. | |
Maximum number of indexes per table | A few hundreds. Depends on the database page size and index types (single-segment or compound). |
Maximum size (total width) of index key | ~8 KB (1/4 of page size) |
Maximum number of indexes per database | Unlimited |
Maximum transaction id | 48-bit (~2.8 * 1014) |
NOTE: When the maximum transaction id has been reached, the database must be marked read-only and a gbak backup and restore is required. |
Data Type Specifics
Name | Size | Range/Precision | Description |
Varchar(n) | 1 to 32765 bytes | n chars | Variable length char or text string. NB, multi-byte character sets reduce number of possible characters proportionately. |
Char(n) | 1 to 32767 bytes | n chars | Fixed length char or text string, padded with spaces. NB, multi-byte character sets reduce number of possible characters proportionately. |
Boolean | 8 bits | -- | Boolean |
SmallInt | 16 bits | -215 to 215-1 | Signed short (word) |
Integer | 32 bits | -231 to 231-1 | Signed long (longword) |
BigInt | 64 bits | -263 to 263-1 | Signed long long (quadword) |
Int128 | 128 bits | -2127 to 2127-1 | Int128 |
Float (Real) | 32 bits | 3.4 x 10-38 to 3.4 x 1038 | Accurate to 7 decimal digits |
Double Precision | 64 bits | 1.7 x 10-308 to 1.7 x 10308 | Accurate to 15 decimal digits |
Timestamp | 64 bits (2 X 32 bits) |
1 Jan 1 CE to 31 Dec 9999 CE | Includes time and date as two 32-bit structures |
Timestamp With Time Zone | 96 bits | 1 Jan 1 CE to 31 Dec 9999 CE with offset in minutes | Includes time and data as two 32-bit structures, and offset or timezone id as 16-bit structure (and 16-bit padding) |
Date | 32 bits | 1 Jan 1 CE to 31 Dec 9999 CE | Date only. Time part is not stored. |
Time | 32 bits | 0:00 to 23:59.9999 | Number of fractions (100 microseconds) since midnight |
Time With Time Zone | 64 bits | 0:00 to 23:59.9999 with offset in minutes | Number of fractions (100 microseconds) since midnight, and offset or timezone id as 16-bit structure (and 16-bit padding) |
BLOB | Variable | -- | Stores data of variable indeterminate size, some functionality not available for blobs of 4GB and larger, maximum size depends on page size (less than 4GB for page size 4096, more than 128GB for page size 16384) |
Numeric (precision, scale) | Variable (16, 32, 64 or 128 bits) |
specifies exactly precision digits of precision (max 38) | Example: Numeric(10,3) holds numbers accurately in the following format: ppppppp.sss |
Decimal (precision, scale) | Variable (16, 32, 64 or 128 bits) |
specifies at least precision digits of precision (max 38) | Example: Decimal(10,3) holds numbers accurately in the following format: ppppppp.sss |
Decfloat (precision) | 64 bit or 128 bit | precision 16: 1 x 10-398 to 9.9..9 x 10384 precision 34: 1 x 10-6176 to 9.9..9 x 106144 |
Decimal floating point number |