Through a JAVA app , I have an aggregate pipeline which runs in , say 15 seconds , showing so in op_msg in mongodb log.
When I copy paste and run it on mongodb SHELL , it returns instantly .
The returned data is not much , and i do use toArray() on mongodb shell , just to make sure that the data is read as well .
Does the op_msg contain the amount of time it takes to send data over network ?
BOTH the JAVA app and the mongo shell are running on the same machine