What is Indexing?
-
Storing <key="user's node address", value="user's node address"> into seperate database for faster reterival is indexing.
Example:
consider 100M entries in facebook social Graph. if user wants to see his news feed, we cannot search all nodes Rather start at node(for user), and this is achieved by storing node's address.
|
![]() |
Reverse Indexing
-
Reverse indexing is used for efficient reverse lookups.
See Indexing.
Reverse Indexing is reverse mapping. <key=user's node address, value=user_id's>, it will help to map all userId's associated with a particular address.
Reverse Hash Table:
(Key: user_address, Value: List of user_ids associated with that address)
When Reverse Lookup is useful
-
when we need to perform lookups based on attributes other than the primary key (user ID)