a JSON column is approximately the same as for a LONGBLOB or LONGTEXT column

MySQL :: MySQL 8.4 Reference Manual :: 13.7 Data Type Storage Requirements

JSON Storage Requirements

In general, the storage requirement for a JSON column is approximately the same as for a LONGBLOB or LONGTEXT column; that is, the space consumed by a JSON document is roughly the same as it would be for the document's string representation stored in a column of one of these types. However, there is an overhead imposed by the binary encoding, including metadata and dictionaries needed for lookup, of the individual values stored in the JSON document. For example, a string stored in a JSON document requires 4 to 10 bytes additional storage, depending on the length of the string and the size of the object or array in which it is stored.

In addition, MySQL imposes a limit on the size of any JSON document stored in a JSON column such that it cannot be any larger than the value of max_allowed_packet.

 

 

posted @ 2026-12-03 18:12  papering  阅读(4)  评论(0)    收藏  举报