Description\n-----------\n\nThe following tables indicate the approximate data storage requirements for each data type.\n\nNumeric Data Types\n\n| Data Type                                    | Storage Requirement                   |\n| -------------------------------------------- | ------------------------------------- |\n| TINYINT     | 1 byte                                |\n| SMALLINT   | 2 bytes                               |\n| MEDIUMINT | 3 bytes                               |\n| INT             | 4 bytes                               |\n| BIGINT       | 8 bytes                               |\n| FLOAT(p)      | 4 bytes if p <= 24, otherwise 8 bytes |\n| DOUBLE       | 8 bytes                               |\n| DECIMAL     | See table below                       |\n| BIT(M)          | (M+7)/8 bytes                         |\n\nNote that MEDIUMINT columns will require 4 bytes in memory (for example, in InnoDB buffer pool).\n\nDecimal\n\nDecimals are stored using a binary format, with the integer and the fraction stored separately. Each nine-digit multiple requires 4 bytes, followed by a number of bytes for whatever remains, as follows:\n\n| Remaining digits | Storage Requirement |\n| ---------------- | ------------------- |\n| 0                | 0 bytes             |\n| 1                | 1 byte              |\n| 2                | 1 byte              |\n| 3                | 2 bytes             |\n| 4                | 2 bytes             |\n| 5                | 3 bytes             |\n| 6                | 3 bytes             |\n| 7                | 4 bytes             |\n| 8                | 4 bytes             |\n\nString Data Types\n\nIn the descriptions below, M is the declared column length (in characters or in bytes), while len is the actual length in bytes of the value.\n\n| Data Type                                                                                    | Storage Requirement                                                                                        |\n| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| ENUM                                                            | 1 byte for up to 255 enum values, 2 bytes for 256 to 65,535 enum values                                    |\n| CHAR(M)                                                         | M × w bytes, where w is the number of bytes required for the maximum-length character in the character set |\n| BINARY(M)                                                     | M bytes                                                                                                    |\n| VARCHAR(M), VARBINARY(M)   | len + 1 bytes if column is 0 – 255 bytes, len + 2 bytes if column may require more than 255 bytes          |\n| TINYBLOB, TINYTEXT         | len + 1 bytes                                                                                              |\n| BLOB, TEXT                         | len + 2 bytes                                                                                              |\n| MEDIUMBLOB, MEDIUMTEXT | len + 3 bytes                                                                                              |\n| LONGBLOB, LONGTEXT         | len + 4 bytes                                                                                              |\n| XMLTYPE                                                      | len + 4 bytes (same as LONGBLOB)                                                                           |\n| SET                                                    | Given M members of the set, (M+7)/8 bytes, rounded up to 1, 2, 3, 4, or 8 bytes                            |\n| INET6                                                          | 16 bytes                                                                                                   |\n| UUID                                                  | 16 bytes                                                                                                   |\n\nNote: Introduced in MariaDB 12.3, the XMLTYPE data type has a maximum storage capacity of 4GB, similar to LONGBLOB_._\n\nIn some character sets, not all characters use the same number of bytes. utf8 encodes characters with one to three bytes per character, while utf8mb4 requires one to four bytes per character.\n\nWhen using field the COMPRESSED attribute, 1 byte is reserved for metadata. For example, VARCHAR(255) will use +2 bytes instead of +1.\n\nURL: https://mariadb.com/docs/server/reference/data-types/data-type-storage-requirements