[DOCS-12597] Docs for SERVER-24860: Optimize away entire pipeline if it can be answered using a query Created: 03/Apr/19  Updated: 13/Nov/23  Resolved: 09/Aug/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.1.10, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-24860 Optimize away entire pipeline if it c... Closed
Participants:
Days since reply: 4 years, 26 weeks, 2 days ago
Epic Link: DOCS: 4.2 Server/Tools

 Description   

Description

Description:

This following topic needs an update: https://docs.mongodb.com/master/reference/explain-results/

The queryPlanner output may include a new field 'optimizedPipeline: true' to indicate that this plan represents an aggregation request where the pipeline has been optimized away and the request is answered using the query engine only. Note that this is either 'optimizedPipeline: true' or no field at all. That is, 'optimizedPipeline: false' can never appear in the output. Here is an example:

"queryPlanner" : {
"plannerVersion" : <int>,
"namespace" : <string>,
"indexFilterSet" : <boolean>,
"parsedQuery" :

Unknown macro: { ... }

,
"queryHash" : <hexadecimal string>,
"planCacheKey" : <hexadecimal string>,
"optimizedPipeline" : true,

Engineering Ticket Description:

An aggregation pipeline can be used to represent a query, like the following:

db.example.aggregate([{$project: {excluded: 0}}, {$match: {predicate: true}}]);

In these cases, it would be more efficient to skip the aggregation layer, and execute the entire computation using a query.

It is expected that pipelines like the above pipeline will be much more common once non-materialized views are introduced in SERVER-142.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 12/Aug/19 ]

Author:

{'name': 'Kay Kim', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-12597: 4.2 agg pipeline optimization (pt 2)
Branch: master
https://github.com/mongodb/docs/commit/e1c517a582bbeca8957550732cac617f2f163eb8

Comment by Githook User [ 09/Aug/19 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-12597: 4.2 agg pipeline optimization
Branch: master
https://github.com/mongodb/docs/commit/f534a729a5824424edd46da89862085e8de39836

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