摘要:
一致性hash算法(consistent hashing)张亮consistent hashing算法早在1997年就在论文Consistent hashing and random trees中被提出,目前在cache系统中应用越来越广泛;1基本场景比如你有N个cache服务器(后面简称cache... 阅读全文
摘要:
从 Mysql 4.0 开始就支持全文索引功能,但是 Mysql 默认的最小索引长度是 4。如果是英文默认值是比较合理的,但是中文绝大部分词都是2个字符,这就导致小于4个字的词都不能被索引,全文索引功能就形同虚设了。国内的空间商大部分可能并没有注意到这个问题,没有修改 Mysql 的默认设置。 为... 阅读全文
摘要:
Node Group[number_of_node_groups] = number_of_data_nodes / NoOfReplicasPartitionWhen usingndbd, the maximum number of partitions that may be defined explicitly for anyNDBtable is8 * [number of node groups]. (The number of node groups in a MySQL Cluster is determined as discussed previously in this s 阅读全文
摘要:
给 mysql 系统表加上 trigger1 Reply默认情况下,mysql 是不能给系统表,例如 mysql.user 加上触发器的。会提示ERROR 1465 (HY000): Triggers can not be created on system tables但是还是可以有办法绕过这个限制。在其他 db 里另外建一个结构名字一样的表,例如create table test.user like mysql.user然后在那个表上建好触发器。这样会在数据库目录中生成 “表名.TRG” 文件。把这个文件拷贝到 mysql 库的目录中,确认访问权限没问题后,重启一下 mysql ,触发器就 阅读全文