Home > Database > Mysql Tutorial > Mysql的row_format

Mysql的row_format

黄舟
Release: 2017-01-17 11:39:59
Original
1854 people have browsed it

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
Copy after login

Modify the row format

ALTER TABLE table_name ROW_FORMAT = DEFAULT
Copy after login


The modification process results in:

fixed--->dynamic: 这会导致CHAR变成VARCHAR
dynamic--->fixed: 这会导致VARCHAR变成CHAR
Copy after login

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)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template