-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
We added a WT_CURSOR::modify operation a while ago, which allows applications to specify an update as a delta. Using that method can lead to much more efficient cache usage when the application has large values.
It would be interesting to automatically convert a WT_CURSOR::update or WT_CURSOR::insert with overwrite=true on an existing key into a modify operation by computing a delta when certain conditions are met.
We could add a new configuration option on cursors that controls the size a value needs to be before we attempt the conversion. A reasonable default value would be 1k, but that deserves investigation.
The delta calculation doesn't need to be sophisticated. It could remove matching bytes at the start and the end, and use any mismatching portion in the middle of the value.