Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

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 :-

  1. 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?

  2. 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

  1. "Indexes and Index-Organized Tables" from the Oracle manual

  2. How does database indexing workHow does database indexing work

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 :-

  1. 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?

  2. 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

  1. "Indexes and Index-Organized Tables" from the Oracle manual

  2. How does database indexing work

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 :-

  1. 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?

  2. 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

  1. "Indexes and Index-Organized Tables" from the Oracle manual

  2. How does database indexing work

edited title
Link
emilly
  • 195
  • 8

Why B-tree indexing is faster thanused instead of hash based indexing?

added 10 characters in body
Source Link
emilly
  • 195
  • 8

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 :-

  1. My question is will oracle bring all index table/map entries in memory from disc and then do the binary search or it is it the search at disc level without bringing all index table records in memory?

  2. 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

  1. "Indexes and Index-Organized Tables" from the Oracle manual

  2. How does database indexing work

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 :-

  1. My question is will oracle bring all index table/map entries in memory from disc and then do the binary search or it is search at disc without bringing all index table records in memory?

  2. 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

  1. "Indexes and Index-Organized Tables" from the Oracle manual

  2. How does database indexing work

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 :-

  1. 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?

  2. 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

  1. "Indexes and Index-Organized Tables" from the Oracle manual

  2. How does database indexing work

edited tags
Source Link
user1822
user1822
Loading
edited tags
Link
user1822
user1822
Loading
Post Closed as "Duplicate" by Jack Douglas
Post Reopened by Jack Douglas
Post Closed as "Not suitable for this site" by Jack Douglas
added 76 characters in body
Source Link
emilly
  • 195
  • 8
Loading
Source Link
emilly
  • 195
  • 8
Loading