0

I need to process 100s of Gigas of DB on the Server Side and the way I'm doing it right now is by loading a JS file with the shell.

i.e: mongo ipaddress:27017/database_name script.js

This works fine but problem is I can see that the data is being processed on the MongoDB shell in the CLIENT side, and all the data is passed through the network.

Is there any way to process the data ONLY on the server side, without transferring all the data ?

Thanks a lot.

jhagege
  • 1,486
  • 3
  • 22
  • 36
  • It depends on what is being done in the script. In all honesty though, you really don't. Those who may be paying more attention are aware that various server side JavaScript execution features of MongoDB are being gradually taken away. It's not a good or stable solution to do so. The best thing to do is be as "near" to the server as possible. But running such code on the server, or even on the same instance, is never a good idea. – Blakes Seven Apr 21 '16 at 11:17
  • How about redirecting the output to some file? Or to /dev/null if you don't need the output? – Abhay PS Apr 21 '16 at 11:38

0 Answers0