driver-legacy/src/main/com/mongodb/DBCursor.java
public DBObject explain() {
        return toDBObject(executor.execute(getQueryOperation(collection.getObjectCodec())
                                           .asExplainableOperation(ExplainVerbosity.QUERY_PLANNER),
                                           getReadPreference(), getReadConcern()));
    }
public DBObject explain() {
        return toDBObject(executor.execute(getQueryOperation(collection.getObjectCodec())
                                           .asExplainableOperation(ExplainVerbosity.QUERY_PLANNER),
                                           getReadPreference(), getReadConcern()));
    }
public DBObject explain ( ) { return toDBObject ( executor . execute ( getQueryOperation ( collection . getObjectCodec ( ) ) . asExplainableOperation ( ExplainVerbosity . QUERY_PLANNER ) , getReadPreference ( ) , getReadConcern ( ) ) ) ; }
Returns an object containing basic information about the execution of the query that created this cursor. This creates a {@code
DBObject} with a number of fields, including but not limited to:
<ul>
<li><i>cursor:</i> cursor type</li>
<li><i>nScanned:</i> number of records examined by the database for this query </li>
<li><i>n:</i> the number of records that the database returned</li>
<li><i>millis:</i> how long it took the database to execute the query</li>
</ul>

@return a {@code DBObject} containing the explain output for this DBCursor's query
@throws MongoException if the operation failed
@mongodb.driver.manual reference/explain Explain Output
Returns an object containing basic information about the execution of the query that created this cursor . This creates a { @code DBObject } with a number of fields including but not limited to : <ul > <li > <i > cursor : < / i > cursor type< / li > <li > <i > nScanned : < / i > number of records examined by the database for this query < / li > <li > <i > n : < / i > the number of records that the database returned< / li > <li > <i > millis : < / i > how long it took the database to execute the query< / li > < / ul >