mysql 中是否实现了聚集索引?
为什么这段代码不起作用?是不是因为MySQL中没有实现聚集索引?
CREATE INDEX niels1 ON `table` CLUSTER (attr1,attr2);
Why is this code not working? Is it because clustered indexes is not implemented in MySQL?
CREATE INDEX niels1 ON `table` CLUSTER (attr1,attr2);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
据我所知,只有 InnoDB 引擎提供聚集索引。
此外,没有专用的“CLUSTER”关键字;所有主键索引都是聚集的。
请参阅http://dev.mysql.com/doc/ refman/5.5/en/innodb-index-types.html
As far as I know only the InnoDB engine offers clustered indices.
Also, there's no dedicated "CLUSTER" keyword; all PRIMARY KEY indices are CLUSTERed.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-index-types.html
因为这不是 MySQL 的有效语法。请参阅亚历克斯的回答。 InnoDB集群主键,其他引擎做自己的事情。
Because this is not a valid syntax for MySQL. See Alex's answer. InnoDB clusters the primary key, other engines do their own thing.
截至目前,MySQL 的存储引擎都不允许您选择要集群的索引。 01/2013。
http://dev.mysql.com/doc/refman /5.5/en/innodb-index-types.html
None of the MySQL's storage engines let you choose which index to cluster on as of this day. 01/2013.
http://dev.mysql.com/doc/refman/5.5/en/innodb-index-types.html
您似乎没有尝试在名为“CLUSTER”的表上创建聚集索引。也许你需要做类似的事情:
It doesn't seem like your trying to create a clustered index on table called "CLUSTER". Maybe you need to do something like: