-
Type: New Feature
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
A common use case for WT_CURSOR::compare is for scan termination checking. In this case, the application positions a cursor at the end of a scan, then advances another cursor until the two cursors are equal.
In this use case, it can be much faster to just check whether two cursors refer to the same page and slot, rather than doing a key comparison on every iteration of the loop.
Consider adding a fast_compare configuration to WT_SESSION::open_cursor so that WT_CURSOR::compare only gives zero for equal cursors and non-zero for non-equal cursors, with fast implementations for btree and LSM cursors.