首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TokuDB热柱展开

TokuDB热柱展开
EN

Database Administration用户
提问于 2016-07-26 09:16:52
回答 1查看 171关注 0票数 1

我需要将varchar字段长度从255扩展到4000。

我使用的是tokudb_version:tokudb-7.5.8 running on Linux 3.16.0-60-generic #80~14.04.1-Ubuntu SMP Wed Jan 20 13:37:48 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

我知道TokuDB支持热列操作,但这并不适用于我(行数为2.1亿行)

显示变量文件:https://drive.google.com/file/d/0B5noFLrbjDjzSW9wdnVjb095Q0U/view?usp=sharing

Alter命令

代码语言:javascript
复制
alter table test_table modify test_column varchar(4000);

Show processlist:
mysql> show processlist;
+----+------+-----------+---------------+---------+------+---------------------------------------------------------+------------------------------------------------------------+-----------+---------------+
| Id | User | Host      | db            | Command | Time | State                                                   | Info                                                       | Rows_sent | Rows_examined |
+----+------+-----------+---------------+---------+------+---------------------------------------------------------+------------------------------------------------------------+-----------+---------------+
|  6 | root | localhost | NULL          | Query   |    0 | init                                                    | show processlist                                           |         0 |             0 |
|  7 | root | localhost | test | Query   |  461 | Queried about 2445001 rows, Inserted about 2445000 rows | alter table test_table modify test_column varchar(4000) |         0 |             0 |
+----+------+-----------+---------------+---------+------+---------------------------------------------------------+------------------------------------------------------------+-----------+---------------+
2 rows in set (0.00 sec)

知道我可能需要设置哪些选项,因为它目前正在以每秒~ 6k的速度处理(这可能要花我10个小时)

EN

回答 1

Database Administration用户

发布于 2016-07-26 11:04:17

如果您只想要在线操作,您应该考虑根据tokudb_disable_slow_alter=ON设置https://www.percona.com/doc/percona-server/5.7/tokudb/tokudb_variables.html#tokudb_禁用_慢的_更改

票数 0
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/144919

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档