The maximum number of rows for a MySQL table depends on the storage engine: InnoDB: 64 KB, adjustable to 8 KBMyISAM: 64 KB, adjustable to 4 GB Other storage engines: limit from a few hundred bytes to a few GB No wait.
Maximum number of rows in a MySQL table
The maximum number of rows in a MySQL table depends on the Storage engine. Different storage engines have different row size limits, and they can also be adjusted through configuration.
InnoDB
InnoDB is the default storage engine in MySQL and has the following row size limit:
Compact
or Redundant
through the innodb_row_format
setting, up to 8 KBMyISAM
MyISAM is another popular storage engine that has the following row size limit:
myisam_max_row_size
setting, up to 4 GBOther storage engines
Other storage engines such as Memory, CSV and Blackhole ) also has its own row size limit, ranging from a few hundred bytes to several gigabytes.
Configuring row size limits
You can adjust the row size limit of the storage engine as follows:
For InnoDB:
<code class="sql">ALTER TABLE table_name ROW_FORMAT=Compact;</code>
For MyISAM:
<code class="sql">ALTER TABLE table_name MAX_ROWSIZE=8388608;</code>
Notes
The above is the detailed content of How many rows can a MySQL table have at most?. For more information, please follow other related articles on the PHP Chinese website!