MySQL Row Format: Difference between fixed and dynamic?

前端 未结 5 672
猫巷女王i
猫巷女王i 2020-12-02 16:54

MySQL specifies the row format of a table as either fixed or dynamic, depending on the column data types. If a table has a variable-length column data type, such as TEXT or

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 17:17

    One key difference occurs when you update a record. If the row format is fixed, there is no change in the length of the record. In contrast, if the row format is dynamic and the new data causes the record to increase in length, a link is used to point to the "overflow" data (i.e. it's called the overflow pointer).

    This fragments the table and generally slows things down. There is a command to defragment (OPTIMIZE TABLE), which somewhat mitigates the issue.

提交回复
热议问题