2016-02-19

MongoDB - How to reset profiling stats (dropping the system.profile collection)

// 1. Turn profiling off
db.setProfilingLevel(0);


// 2. Drop the collection
db.system.profile.drop();


// 3. Start profiling
db.setProfilingLevel(2);


// 4. Test
db.system.profile.find().count();

No comments:

Post a Comment