Home > Back-end >  In the 2020-10-13 s: the difference between a hash and B tree?
In the 2020-10-13 s: the difference between a hash and B tree?

Time:10-13

In the 2020-10-13 s: the difference between a hash and B + tree? # # f greatly architects a daily topic

CodePudding user response:

1. Hash only support in with=, not to support range queries, time complexity: O (1)

2. The B + tree to support range queries, time complexity: O (log n)

CodePudding user response:

The speed of a hash index is strong in the equivalent query,
Btree query speed in the range queries, also support the left matching query use index,
Are indexed built btree index

CodePudding user response:

MyISAM and InnoDB with B + Tree, the MEMORY use Hash,
B + Tree range queries, Hash equivalent query,
  • Related