Rule Definition
Having explain() in the production code can slow down the performance of the code and it is not required.
Remediation
Do not use explain() in production code.
Violation Code Sample
DBObject explainObject = db.getCollection("mnMongo1").find(searchObject).explain();
Fixed Code Sample
// DBObject explainObject = db.getCollection("mnMongo1").find(searchObject);
//.explain not to be used
Related Technologies
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.