Formulas for calculating field storage
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The following table lists the formulas for calculating the field storage values (in bytes) for different data types.
| ABL Data type (SQL equivalent) | Value | Field storage in bytes |
|---|---|---|
CHARACTER (VARCHAR) |
Character string |
1 +
number of characters, excluding trailing blanks. If the number of characters is greater than 240, add 3 to the number of characters instead of 1. |
DECIMAL (DECIMALor NUMERIC) |
Zero | 1 |
| Nonzero |
2+(# significant digits + 1)/2
|
|
INTEGER (INTEGER) |
1 to 127 | 1 |
| 128 to 32,511 | 2 | |
| 32,512 to 8,323,071 | 3 | |
| 8,323,072 to 2,147,483,647 | 4 | |
INT64 (BIGINT)
|
1 to 127 | 1 |
| 128 to 32,511 | 2 | |
| 32,512 to 8,323,071 | 3 | |
| 8,323,072 to 2,147,483,647 | 4 | |
| 2,147,483,648 to 545,460,846,591 | 5 | |
| 545,460,846,592 to ~139,636,000,000,000 | 6 | |
| ~139,636,000,000,000 to ~35,750,000,000,000,000 | 7 | |
| Greater than ~35,750,000,000,000,000 | 8 | |
DATE (DATE) |
Date | Same as INTEGER.Dates are stored as an
|
DATE-TIME
|
Date and time |
DATE + 4
|
DATE-TIME-TZ
|
Date, time, and time zone |
DATE + 8
|
LOGICAL (BIT) |
False | 1 |
| True | 2 |