wiredtiger/wiredtiger.github.com — Issue #150: storing primary data in the secondary
Author: wiredtiger
Created: 2012-01-31 19:20:53+00:00
State: open

Some engines store a copy (or part of a copy) of the primary data item in the secondary to speed the use of a secondary index, avoiding subsequent lookup in the primary.

In Berkeley DB, an "ordered" lookup when walking a secondary becomes a "random" lookup on the primary in order to return the primary's data item, resulting in a colder cache and more deadlocks. By storing a copy of the primary's data in the secondary, we can avoid the second lookup.