Data Set Memory Sizer
Use the table below to calculate how much memory a data set requires by entering the number of columns for each data type.
Since numerical data types have a fixed size, calculaing their memory requirements is simply a matter of specifying the number of columns for each byte size.
However, textual columns can vary in the number of characters they contain, and they can use different byte sizes depending on how characters are encoded.
The character encoding determines how many different text characters can be used.
For example, plain
ASCII only allows 255 different text characters, so it only uses one byte to store a text character.
Various forms of
Unicode text allow for allow for additional symbol characters and foreign language characters, so they can use up to four bytes to store a single text character.
For character based columns, therefore, determine the byte size for the encoding that is used. Then, determine the average number of characters per row for each byte size.
Number of
Rows |
Number of
Columns |
Byte
Size |
Bit
Size |
DataType
Description |
Subtotal Bytes
Per Row |
SubTotal Byte Size of
Entire Data Set |
Common DataType Examples** |
|
|
1 |
8 |
8-bit number |
|
|
int8, uint8, tinyint |
|
|
2 |
16 |
16-bit number |
|
|
int16, uin16, smallint, short |
|
|
3 |
24 |
24-bit number |
|
|
mediumint |
|
|
4 |
32 |
32-bit number |
|
|
int32, uint32, int, long, single, smalldatetime |
|
|
8 |
64 |
64-bit number |
|
|
int64, uint64, bigint, double, datetime |
|
|
|
|
|
|
|
|
|
|
1* |
1 |
1-bit logical value |
|
|
bit, bool, boolean, logical |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Avg Number of
Characters/Row |
Byte
Size |
Bit
Size |
DataType
Description |
Subtotal Bytes
Per Row |
Subtotal Byte Size of
Entire Data Set |
Character Encoding Examples |
|
|
1 |
8 |
1-byte character |
|
|
UTF-8, ASCII |
|
|
2 |
16 |
2-byte character |
|
|
UTF-8,UTF-16, UCS-2 |
|
|
3 |
24 |
3-byte character |
|
|
UTF-8 |
|
|
4 |
32 |
4-byte character |
|
|
UTF-16, UTF-32, UCS-4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Size Per Row |
Size of Entire Data Set |
|
|
|
|
|
Total Bytes |
|
|
|
|
|
|
|
Total Megabytes |
|
|
|
|
|
|
|
Total Gigabytes |
|
|
|
|
|
|
|
Total Terabytes |
|
|
|