开发者

Is clustered indexes implemented in mysql?

Why开发者_C百科 is this code not working? Is it because clustered indexes is not implemented in MySQL?

CREATE INDEX niels1 ON `table` CLUSTER (attr1,attr2);


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


Because this is not a valid syntax for MySQL. See Alex's answer. InnoDB clusters the primary key, other engines do their own thing.


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


It doesn't seem like your trying to create a clustered index on table called "CLUSTER". Maybe you need to do something like:

CREATE INDEX niels1 ON CLUSTER (attr1,attr2) USING BTREE;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜