update : 2015.11.03
php.shukuma.com검색:
|
MongoCursor::explain(PECL mongo >=0.9.2) MongoCursor::explain — Return an explanation of the query, often useful for optimization and debugging 설명
public array MongoCursor::explain
( void
)
인수이 함수는 인수가 없습니다. 반환값Returns an explanation of the query. 예제Example #1 MongoCursor::explain() example
<?php 위 예제의 출력 예시: 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) { } } } } 오류/예외Throws MongoConnectionException if it cannot reach the database. 참고MongoDB core docs on » explain. |