1.

Syntax for specifying an initial batch size for the cursor is ________________(a) cursor: { batchSize: }(b) cursor: { batchSize: }(c) cur: { batchSize: }(d) none of the mentionedI had been asked this question in a job interview.My question is based upon Aggregation Pipeline topic in section Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

Correct answer is (b) cursor: { batchSize: }

The best explanation: A batchSize of 0 means an empty first BATCH and is USEFUL for quickly RETURNING a cursor or failure message WITHOUT doing SIGNIFICANT server-side work.



Discussion

No Comment Found

Related InterviewSolutions