[DOCS-11663] There is no explanation of how queries against views are implemented Created: 28/Apr/18  Updated: 13/Nov/23  Resolved: 10/Nov/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.0.0, 4.2.0, 4.4.0, 5.0.0, 5.1.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Improvement Priority: Major - P3
Reporter: William Byrne III Assignee: Jason Price
Resolution: Done Votes: 0
Labels: views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Issue Links:
Related
Participants:
Days since reply: 2 years, 13 weeks ago
Epic Link: DOCSP-1769
Story Points: 3

 Description   

Our documentation for views says only

Views are computed on demand during read operations, and MongoDB executes read operations on views as part of the underlying aggregation pipeline.

(in a section titled View Creation).

While that is all correct, more detail is needed. I suggest something like:

What happens when you run a query against a view is:

  • the query filter, projection, sort, skip, limit etc parts of the find command are converted to their equivalent aggregation stages.
  • those stages are added to the end of the aggregation pipeline in the view definition.
  • Aggregation Pipeline Optimization then reorders and/or coalesces stages where doing so will give a performance benefit while not changing the results.

(and it would probably be appropriate under the heading for Behaviour on the same page.



 Comments   
Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-11663 queries on views implementation (#6115) (#6119)

DOCS-11663 queries-on views implementation

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v4.0
https://github.com/mongodb/docs/commit/3f18dd3c044b56dc501acecae3cc11575c9d49d8

Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-11663 queries on views implementation (#6115) (#6118)

DOCS-11663 queries-on views implementation

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v4.2
https://github.com/mongodb/docs/commit/c8aa96f7b036bdfe4f7655bff7511af00f8fcc2b

Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-11663 queries on views implementation (#6115) (#6117)

DOCS-11663 queries-on views implementation

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v4.4
https://github.com/mongodb/docs/commit/d0e1d4344526137372e0f559828e6539b5ad3d3b

Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-11663 queries on views implementation (#6115) (#6116)

DOCS-11663 queries-on views implementation

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: v5.0
https://github.com/mongodb/docs/commit/f505c4f43cc5035471a16c86f758cafb7ef6629b

Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}

Message: DOCS-11663 queries on views implementation (#6115)

DOCS-11663 queries-on views implementation

Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
Branch: master
https://github.com/mongodb/docs/commit/2909bc5ac94626bea9493c1a441f68d9a45355ce

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