|
MongoCursor::explainReturn an explanation of the query, often useful for optimization and debugging Beschreibung
public array MongoCursor::explain
( void
)
Parameter-ListeDiese Funktion hat keine Parameter. RückgabewerteReturns an explanation of the query. BeispieleBeispiel #1 MongoCursor::explain example
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
array(8) {
["cursor"]=>
string(15) "BtreeCursor x_1"
["startKey"]=>
array(1) {
["x"]=>
int(1)
}
["endKey"]=>
array(1) {
["x"]=>
int(1)
}
["nscanned"]=>
float(4)
["n"]=>
int(4)
["scanAndOrder"]=>
int(1)
["millis"]=>
int(3)
["allPlans"]=>
array(2) {
[0]=>
array(3) {
["cursor"]=>
string(15) "BtreeCursor x_1"
["startKey"]=>
array(1) {
["x"]=>
int(1)
}
["endKey"]=>
array(1) {
["x"]=>
int(1)
}
}
[1]=>
array(3) {
["cursor"]=>
string(11) "BasicCursor"
["startKey"]=>
array(0) {
}
["endKey"]=>
array(0) {
}
}
}
}
Fehler/ExceptionsThrows MongoConnectionException if it cannot reach the database. Siehe auchMongoDB core docs on » explain. |