[SERVER-29454] $facet vs parallel queries ? Created: 06/Jun/17  Updated: 06/Jun/17  Resolved: 06/Jun/17

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Matthias Benkort [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hi all,

I just have a quick question about the usage of the `$facet` aggregation pipeline operator. It comes as a handy operator to perform multiple aggregations at once, however, it seems to be slower than simply performing the queries in parallel.

Though I am not running those tests on a production setup, I was wondering about the use cases of the `$facet` operator? It seems to be quite related to the `$bucket` and `$bucketAuto` operators and may actually become more efficient when used with those? Is that correct?

Any clue or insights is highly welcome.
Thanks.



 Comments   
Comment by Kelsey Schubert [ 06/Jun/17 ]

Hi KtorZ,

Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group.

Kind regards,
Thomas

Generated at Thu Feb 08 04:20:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.