diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2014-01-27 18:01:26 -0500 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-01-29 13:18:47 -0500 |
commit | 3b3c25e571852893373ae2e2b361397b260687c9 (patch) | |
tree | e2350ef7605c1e5a6d33649d095d19a624803ea9 /src/mongo/db/query/stage_types.h | |
parent | 2bee3f018b8d4351f8261c405adcdff44c7f9a70 (diff) | |
download | mongo-3b3c25e571852893373ae2e2b361397b260687c9.tar.gz |
SERVER-12460 faster count for simple queries
Diffstat (limited to 'src/mongo/db/query/stage_types.h')
-rw-r--r-- | src/mongo/db/query/stage_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/query/stage_types.h b/src/mongo/db/query/stage_types.h index ecbacb9068a..cb1ffb391d1 100644 --- a/src/mongo/db/query/stage_types.h +++ b/src/mongo/db/query/stage_types.h @@ -38,6 +38,11 @@ namespace mongo { STAGE_AND_SORTED, STAGE_COLLSCAN, + // If we're running a .count(), the query is fully covered by one ixscan, and the ixscan is + // from one key to another, we can just skip through the keys without bothering to examine + // them. + STAGE_COUNT, + // If we're running a distinct, we only care about one value for each key. The distinct // stage is an ixscan with some key-skipping behvaior that only distinct uses. STAGE_DISTINCT, |