The list of possible stages will vary by MongoDB server version and type of query you are explaining, but the most complete list (including some internal stages you may never see in explain output) would be in the source code, eg: mongo/stage_types.h at master · mongodb/mongo · GitHub
The documentation mentions some of the common stages but does not attempt to be an exhaustive list as the notion is that the stages should be “human-readable”.
If there are specific stages you would like to learn more about in the context of explain results, please share your explain output.
Thanks for your reply.
I did that post because on the certification exam I had a question where I had select from a list of responses all the correct stages of the explain output.
My surprise was that I didn’t found a list of all that stages on the documentation.
Is a bit strange that the only place with a complete list is on source code.
Thanks to that I guess that I failed that question on the exam.
The certification exam questions should only cover information that is included in the documentation and University courses, however I will pass your feedback on to the team so they can review any relevant cert questions about aggregation stages in the explain output.
Hi, I have the same question in the November certification exam. I believe the SORT stage should be available in the output of explain if the query plan can not use an index for sorting. However, I’m not sure if PROJECTION is a correct answer to that exam question. I selected that option of PROJECTION in the exam because I found this stage in the next question showing the output of a explain.