Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all articles
Browse latest Browse all 1562

Index Type created not same as mentioned in documentation. (2 replies)

$
0
0
Hello,

We have installed the following cluster version on linux:

SELECT VERSION();
5.5.19-ndb-7.2.4-gpl

w.r.t the following link:
http://dev.mysql.com/doc/refman/5.5/en/create-index.html
for the section "index_type" :

I tried out the stuff mentioned for the description of "index_type" & found the following differences:
1) As per the documentation:

...Where multiple index types are listed, the first one is the default when no index type specifier is given.

Storage Engine Permissible Index Types
MyISAM BTREE
InnoDB BTREE
MEMORY/HEAP HASH, BTREE
NDB HASH, BTREE (see note in text)

So as per above I created a table & created an index on the table & expected the index type to be "HASH", but it is actually a "BTREE" index.

CREATE TABLE lookup
(id INT)
engine=ndb;

alter table lookup add index idx_simple (id);
[I even tried the CREATE INDEX, without specifying the "USING BTREE" option]

I refered the index type from TOAD UI, which showed it as "BTREE". I also refered the information_schema.statistics table
for the index name = "idx_simple", which showed as "BTREE" under the column "INDEX_TYPE".

2) As per the documentation:
Note
For indexes on NDB table columns, the USING option can be specified only for a unique index or primary key.

But, I was able to create a normal index as mentioned below by using the "USING" clause.
CREATE INDEX id_index ON lookup (id) USING BTREE;

3) As per the documentation:
USING HASH prevents the creation of an implicit ordered index; otherwise, creating a unique index or primary key on an NDB table automatically results in the creation of both an ordered index and a hash index, each of which indexes the same set of columns.

How do I get information on the above two indexes created (in "mysql" or "information_schema" db).


Regards,
Sachin Vyas.

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>