O'Reilly logo
  • Peng Zhang thinks this is interesting:

MySQL 5.0 and newer pack the digits into a binary string (nine digits per four bytes). For example, DECIMAL(18, 9) will store nine digits from each side of the decimal point, using nine bytes in total: four for the digits before the decimal point, one for the decimal point itself, and four for the digits after the decimal point.


Cover of High Performance MySQL, 3rd Edition


9 digits = 4 bytes