update : 2015.11.03
php.shukuma.com검색:
|
MongoCursor::maxTimeMS(PECL mongo >=1.5.0) MongoCursor::maxTimeMS — Sets a server-side timeout for this query 설명Specifies a cumulative time limit in milliseconds to be allowed by the server for processing operations on the cursor. 인수
반환값This cursor. 오류/예외Throws MongoCursorException if this cursor has started iterating. Causes methods that fetch results to throw a MongoExecutionTimeoutException if the query takes longer than the specified number of milliseconds in processing time. 예제Example #1 MongoCursor::maxTimeMS() example In the following example, the server will abort the query if the cursor requires more than two seconds in processing time to return its results.
<?php 주의Warning
Unlike MongoCursor::timeout(), which specifies a client-side timeout, MongoCursor::maxTimeMS() can be used to cause the MongoDB server to abort long-running queries. This timeout is cumulative for the lifetime of the cursor (i.e. each batch will contribute to this time limit). The timeout only considers processing time; idle time is not considered. |