-
Notifications
You must be signed in to change notification settings - Fork 511
Closed
Description
The singleLevelIterator
and twoLevelIterator
init
methods both load the the highest index block. When CockroachDB is performing an MVCC Get, this may be unnecessary. If the iterator is only ever used for a call to SeekPrefixGE
and the bloom filter is effective, the index block may never be seeked. It's unclear if this is at all impactful, and lazily loading the index block will inevitably add some small overhead and code complexity to seek operations.
Alternatively, we could implement a special Reader.GetPrefix
method this optimization and others (#2002), without needing to edit the codepaths for other seek operations.
Jira issue: PEBBLE-116