Hi folks,

While reading on some material on MySql and indexing I came across
$subject. In our DB scripts we use hash indexes with Innodb engine right ?!
According to mysql docs [1];

============================================

Some storage engines permit you to specify an index type when creating an
index. The permissible index type values supported by different storage
engines are shown in the following table. Where multiple index types are
listed, the first one is the default when no index type specifier is given.
  Storage Engine Permissible Index Types
InnoDB<http://dev.mysql.com/doc/refman/5.6/en/innodb-storage-engine.html>
BTREE  MyISAM<http://dev.mysql.com/doc/refman/5.6/en/myisam-storage-engine.html>
BTREE  MEMORY<http://dev.mysql.com/doc/refman/5.6/en/memory-storage-engine.html>
/HEAP HASH, BTREE
NDB<http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster.html>
HASH, BTREE (see note in text)

If you specify an index type that is not valid for a given storage engine,
but there is another index type available that the engine can use without
affecting query results, the engine uses the available type. The parser
recognizesRTREE as a type name, but currently this cannot be specified for
any storage engine.
 ============================================

According to the second section, I wonder if mysql silently converts the
indexes to BTREE even though we specify it as Hash?! I am totally new to
database indexes so please correct me if I have misunderstood the whole
subject matter :)

[1] - http://dev.mysql.com/doc/refman/5.6/en/create-index.html

-- 
Thanks,
Shariq.
Phone: +94 777 202 225
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to