I have an employee table which has index on name. I want to understand how Oracle works at high level
My understanding based on resources mentioned below:-
DB constructs the index table/map where it will keep the name in sorted fashion with memory location as the value.
Question :-
My question is will oracle bring all index table/map entries in memory from disc and then do the binary search or is it the search at disc level without bringing all index table records in memory?
If I compare this approach with Java based data structures, Oracle is maintaining the TreeMap of column where key is employee name and value is memory location of that entry. So to find any entry, look up time will be log(n). My question why not DB/oracle takes hash based approach where it keeps the hashtable where it calculate the memory location based on name value and put the entry there. So lookup time to find entry will be O(1) .
Resources I referred