Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 为什么';更改行格式时,我的表格大小是否会减小?_Mysql_Innodb - Fatal编程技术网

Mysql 为什么';更改行格式时,我的表格大小是否会减小?

Mysql 为什么';更改行格式时,我的表格大小是否会减小?,mysql,innodb,Mysql,Innodb,我们目前在innodb中使用MySQL,我们有一些行格式紧凑的大型表。当我将行格式更改为compressed时,表的大小仍然相同。有人知道原因吗?是否可能为表声明了ROW\u FORMAT=COMPRESSED,但没有启用配置值innodb\u file\u FORMAT=BARRACUDA 如果不执行后一步,则对Barracuda行格式的任何请求都不会生效。这样的请求会产生一个警告: mysql> alter table foo row_format=compressed; Query

我们目前在innodb中使用MySQL,我们有一些行格式紧凑的大型表。当我将行格式更改为compressed时,表的大小仍然相同。有人知道原因吗?

是否可能为表声明了ROW\u FORMAT=COMPRESSED,但没有启用配置值innodb\u file\u FORMAT=BARRACUDA

如果不执行后一步,则对Barracuda行格式的任何请求都不会生效。这样的请求会产生一个警告:

mysql> alter table foo row_format=compressed;
Query OK, 0 rows affected, 2 warnings (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 2

mysql> show warnings;
+---------+------+-----------------------------------------------------------------------+
| Level   | Code | Message                                                               |
+---------+------+-----------------------------------------------------------------------+
| Warning | 1478 | InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. |
| Warning | 1478 | InnoDB: assuming ROW_FORMAT=COMPACT.                                  |
+---------+------+-----------------------------------------------------------------------+
此外,除非同时启用“每个表的innodb\u文件”,否则不能使用压缩行格式

mysql> alter table foo row_format=compressed;
Query OK, 0 rows affected, 2 warnings (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 2

mysql> show warnings;
+---------+------+---------------------------------------------------------------+
| Level   | Code | Message                                                       |
+---------+------+---------------------------------------------------------------+
| Warning | 1478 | InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. |
| Warning | 1478 | InnoDB: assuming ROW_FORMAT=COMPACT.                          |
+---------+------+---------------------------------------------------------------+

这是一个很好的答案。谢谢比尔-今天我也很有用;-)