I should get the execution time of a query in mongoDB. Using explain() I noticed that it is zero millis. So, Is it possible in mongoDB to obtain the execution time of a query in microseconds in a simple way? For example if I wanted to calculate mean and variance of a sample of 10k test queries (where each query lasts micros), how could I do? I'm using PHP.
Refer to these links, they may be helpful for you
http://docs.mongodb.org/manual/tutorial/manage-the-database-profiler/