Once a page is evicted with lookaside entries, instantiating it is expensive because there are multiple reads from the lookaside table, then the lookaside entries are removed.
For reads with a recent snapshot / timestamp, the on-disk versions of data may be sufficient to get correct results without instantiating entries from the lookaside table.
A possible solution would be to add a new WT_REF state, WT_REF_MEM_LOOKASIDE, for an in-memory page that has lookaside entries. Reads of a WT_REF_LOOKASIDE page check if lookaside entries are required, and if so do full instantiation. If lookaside entries are not required for the read, just the page image is read and the state set to WT_REF_MEM_LOOKASIDE.
Reads of such a page check ref->page_las to determine whether lookaside entries are required for correctness. If so, the page is instantiated and transitions to WT_REF_MEM. Any updates to the page must also do a full instantiation.
- links to