summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/skip.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/skip.h')
-rw-r--r--src/mongo/db/exec/skip.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/exec/skip.h b/src/mongo/db/exec/skip.h
index 24937662d02..5d0a764bd8a 100644
--- a/src/mongo/db/exec/skip.h
+++ b/src/mongo/db/exec/skip.h
@@ -66,8 +66,13 @@ public:
private:
WorkingSet* _ws;
- // We drop the first _toSkip results that we would have returned.
- long long _toSkip;
+ // The number of results left to skip. This number is decremented during query execution as we
+ // successfully skip a document.
+ long long _leftToSkip;
+
+ // Represents the number of results to skip. Unlike '_leftToSkip', this remains constant and
+ // is used when gathering statistics in explain.
+ const long long _skipAmount;
// Stats
SkipStats _specificStats;