Home > database >  Turn the hash index and btree index
Turn the hash index and btree index

Time:10-06

Mysql learned a hash index and btree index, the book says, a hash index can only use=or & lt;=> Operator equation, and can't use & lt; Or & lt;=the range operator, so I press it got two tables, it is like this:
1, first create a btree index of city table


2, and then build a hash index city_memory table


3, the two data inserted into the same table

4, respectively query


And then the result is not a book, a hash index due to cannot use the scope operator, so be full scan, type for all, and btree index can use the scope operator, and then use indexing query, type for range, but the result of the I type are all and retrieval is the same as the line, the two indexes explain is the same, why, where I do have a question, welcome to pointed out problem huh
  • Related