Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Idea of optimizing removal from index #71

Open
jschmieg opened this issue Mar 17, 2017 · 0 comments
Open

Idea of optimizing removal from index #71

jschmieg opened this issue Mar 17, 2017 · 0 comments

Comments

@jschmieg
Copy link
Contributor

There are 2 steps in removal from index:

  1. findRecord(key) with Index Cursor - returns RecordID
  2. unindex(key, RecordID) in SortedDataInterface, which also looks for key in tree.
    In case of many duplicated keys in tree, searching is very non-optimal, can be compared to looking in list (~O(n)).
    Idea is to cache location of (key,recordID) pair in IndexCursor : seek() or next() methods, and then reuse them in unindex() method, instead of looking for them again.
    Cache may be placed in RecoveryUnit instance created for current operation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant