Can someone please suggest on how beneficial creating view would be.
I have a collections with ~30M documents. When i created a view it is not even being listed.but i got a message saying {OK} but db.currentOp() is also Inprog as empty array.
This code snippet is messed up. Can you please paste in a little more carefully and use the code widget “</>” to make it easier to read? And please do not use Windows “smart quotes” in your samples.
I have tried the same script in local and it is working fine but in the actual environment where the collection are sharded it is not inserting records only view is getting created.