How to add Btree or hash index to a table in mysql?

14,981

CREATE INDEX supports USING BTREE or USING HASH on the end.

http://dev.mysql.com/doc/refman/5.0/en/create-index.html

Share:
14,981

Related videos on Youtube

amir shadaab
Author by

amir shadaab

Updated on September 03, 2022

Comments

  • amir shadaab
    amir shadaab over 1 year

    I have two tables and two queries on those tables. I am using SQL workbench to query these tables. Can someone tell me the syntax of adding BTREE or HASH index to these tables?

  • amir shadaab
    amir shadaab over 11 years
    Which one is the default type?
  • Kevin Brown
    Kevin Brown over 6 years
    BTREE is the default.
  • dwkd
    dwkd about 5 years
    also HASH indexes are only for in-memory tables (or NDB) but not myISAM or InnoDB