Grokking MongoDB
Vote

0% completed

​

MongoDB Aggregation $out

A pipeline can store its results in a collection instead of returning them to the client. The stage that does this is called $out, and it takes the name of the collection to write. It must be the last stage in the pipeline, and it replaces everything the target collection held before.

Use $out when a calculation is slow and the same answer is read many times, for example a sales report that a dashboard opens throughout the day. The pipeline runs once, and readers then query a small stored collection

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content