summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/docs/cursor-random.dox
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/docs/cursor-random.dox')
-rw-r--r--src/third_party/wiredtiger/src/docs/cursor-random.dox16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/docs/cursor-random.dox b/src/third_party/wiredtiger/src/docs/cursor-random.dox
new file mode 100644
index 00000000000..70a28407ea5
--- /dev/null
+++ b/src/third_party/wiredtiger/src/docs/cursor-random.dox
@@ -0,0 +1,16 @@
+/*! @m_page{{c,java},cursor_random,Cursor random}
+
+The \c next_random configuration to the WT_SESSION::open_cursor method
+configures the cursor to return a pseudo-random record from a row-store
+object.
+
+The ability to return a random record was added to support a particular
+application, and as a result has somewhat unusual semantics. First, the
+returned record may not be random at all in the case of objects with only a few
+rows (especially when the object has never been written to the backing store).
+In such objects, the WT_CURSOR::next method for cursors configured with \c
+next_random may return the same row on each call. Additionally, even in larger
+objects, the WT_CURSOR::next method usually returns the first record from a
+random page in the underlying file, not a random record from a random page.
+
+ */