Home >Database >Mysql Tutorial >Mysql的row_format
Mysql's row_format
In mysql, if there are no varchar, text and their transformed fields, blob and their transformed fields in a table, then this table is actually It is called a static table, that is, the row_format of the table is fixed, which means that each record occupies the same bytes. The advantage is that it is fast to read, but the disadvantage is that it wastes extra space.
www.2cto.com
If there are varchar, text and their transformed fields, blob and their transformed fields in a table, then this table is actually called a dynamic table, that is, the table The row_format of the table is dynamic, which means that the bytes occupied by each record are dynamic. Its advantage is that it saves space, but its disadvantage is that it increases the time overhead of reading.
Therefore, tables with a large volume of search queries are generally designed as static tables in exchange for space for time.
row_format has some other values:
DEFAULT FIXED DYNAMIC COMPRESSED REDUNDANT COMPACT www.2cto.com
Modify the row format
ALTER TABLE table_name ROW_FORMAT = DEFAULT
The modification process results in:
fixed--->dynamic: 这会导致CHAR变成VARCHAR dynamic--->fixed: 这会导致VARCHAR变成CHAR
The above is the content of Mysql's row_format. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!