Profiling MongoDB

framework8 runs on MongoDB. MongoDB profiling is very useful to optimise performance. Especially if you are querying custom properties. Profiling enables you to see where the slow queries are occurring and helps you to work out the appropriate indexing.

Mongo db profiling can be switched on using:


The results can then be queried:

db.system.profile.find( { millis : { $gt :100} , op:"query" } ).pretty().sort({ts:-1})

RoboMongo is a good GUI to use for calling the profile query if you don't want to use the command line. It can be downloaded

More information on profiling can be found here: