Amazon interview question

What's a database index

Interview Answer

Anonymous

21 June 2020

Indexing a was of improving performance on search on data fields. By creating an index database creates an additional data structure for the indexes field wit pointers to actual data. and then sorts the data structure. So when a query runs on indexed field, it looks at the indexed table using a binary search - an efficient way of searching on sorted data.