[DOCS-15802] [SERVER] Add detail to $sample page Created: 04/Jan/23  Updated: 22/Jan/24

Status: Backlog
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: backlog, request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-72518 Make 5% random-cursor $sample cutoff ... Closed
Participants:
Days since reply: 1 year, 5 weeks ago

 Description   

Two things that are probably worth clarifying:

  • The 5% threshold is not configurable. It is thought to be a good approximation of the cutoff value where scanning the entire collection will be faster than that many random I/Os.
  • If we are not under the 5% threshold, it's worth saying that we will do a top-k sort (where k = sample size) by a generated random value. This top-k sort can possibly spill to disk if K documents are larger than 100MB, and so allowDiskUse may need to be used.

Generated at Thu Feb 08 08:13:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.