MySQL - Barracuda 文件格式和行压缩以避免 ERROR 1118 Row Size Too Large

标签 mysql innodb data-warehouse denormalization

我正在尝试使用 mysql 5.5.31(社区版)进行行压缩,以避免在仓库类型上下文中进行非规范化时出现以下错误。

ERROR 1118 (42000): Row size too large. The maximum row size for the used
table type, not counting BLOBs, is 65535. You have to change some columns
to TEXT or BLOBs

我启用了如下各种系统变量:

mysql> show variables like 'innodb_file%';
+--------------------------+-----------+
| Variable_name            | Value     |
+--------------------------+-----------+
| innodb_file_format       | Barracuda |
| innodb_file_format_check | ON        |
| innodb_file_format_max   | Barracuda |
| innodb_file_per_table    | ON        |
+--------------------------+-----------+

但是当我尝试执行以下操作作为测试时,我仍然会遇到相同的行大小太大的错误。

create table foo (  first varchar(10000),
    second varchar(10000),
    third varchar(10000),
    fourth varchar(10000),
    fifth varchar(10000),
    sixth varchar(10000),
    seventh varchar(10000)
 ) ENGINE=InnoDB ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8;

有谁知道我在这里可能遗漏了什么?有几个来源表明这应该有效。

MYSQL - How to workaround the row size limit of 66 KBytes

Change limit for "Mysql Row size too large"

Django-MySQL enable Row_Format=Compress with syncdb

最佳答案

https://dba.stackexchange.com/a/22463 - 这表明即使在 Barracuda 下,组合的行长度仍然有限​​制。

尝试将 varhcar(x) 更改为 textblob,它在我的测试中运行良好:

create table foo_text (  
    first longtext,
    second longtext,
    third longtext,
    fourth longtext,
    fifth longtext,
    sixth longtext,
    seventh longtext
) ENGINE=InnoDB ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8;

关于MySQL - Barracuda 文件格式和行压缩以避免 ERROR 1118 Row Size Too Large,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20352835/

相关文章:

php - 查询100k记录表,执行时间超时

mysql - 我可以在 MySQL 中执行可选的 LEFT JOIN 吗?

mysql - 批量更新大型 InnoDB 表中未索引的列

sql-server - 在数据仓库场景中使用WITH(NOLOCK)有什么缺点

sql - 数据仓库 - 营业时间

java - MONDRIAN:刷新维度缓存

INT 上的 MySQL 和正则表达式

php - 通过Wordpress数据库表提取数据

mysql - DBI 下批量事务 DELETE 导致 InnoDB 锁耗尽

mysql innodb 缓冲池大小有哪些依赖项