diff options
author | Justin Seyster <justin.seyster@mongodb.com> | 2018-09-26 15:50:47 -0400 |
---|---|---|
committer | Justin Seyster <justin.seyster@mongodb.com> | 2018-09-26 15:50:47 -0400 |
commit | da63195cc421f8f29c1c0bef5fa2c2226d230dfd (patch) | |
tree | e57fffda4743642f09ff8322ecfa9a6631d2db60 /src/mongo/db/commands/distinct.cpp | |
parent | 729a923ea4e0ba5518afb2efb0133aa5f5194391 (diff) | |
download | mongo-da63195cc421f8f29c1c0bef5fa2c2226d230dfd.tar.gz |
SERVER-9507 Optimize $sort+$group+$first pipeline to use DISTINCT_SCAN
Diffstat (limited to 'src/mongo/db/commands/distinct.cpp')
-rw-r--r-- | src/mongo/db/commands/distinct.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index 8b6098f4341..2c617c86a18 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -148,8 +148,8 @@ public: Collection* const collection = ctx->getCollection(); - auto executor = - uassertStatusOK(getExecutorDistinct(opCtx, collection, nss.ns(), &parsedDistinct)); + auto executor = uassertStatusOK( + getExecutorDistinct(opCtx, collection, QueryPlannerParams::DEFAULT, &parsedDistinct)); auto bodyBuilder = result->getBodyBuilder(); Explain::explainStages(executor.get(), collection, verbosity, &bodyBuilder); @@ -192,7 +192,8 @@ public: Collection* const collection = ctx->getCollection(); - auto executor = getExecutorDistinct(opCtx, collection, nss.ns(), &parsedDistinct); + auto executor = + getExecutorDistinct(opCtx, collection, QueryPlannerParams::DEFAULT, &parsedDistinct); uassertStatusOK(executor.getStatus()); { |