數據庫索引爲何不用hash表而用b+樹

1.hash表只能匹配是否相等,不能實現範圍查找 select * from xx where id > 23; 這時就沒辦法索引了排序 2.當須要按照索引進行order by時,hash值沒辦法支持排序 select * from xx order by score desc;若是score爲創建索引的字段,hash值沒辦法輔助排序。索引 3.組合索引能夠支持部分索引查詢,如(a,b,c)的組合
相關文章
相關標籤/搜索