Quick MongoDb Javascript Requests

I am reading this document: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24mod

$mod

The $ mod operator allows you to execute quick modular queries to replace the usual case for where clauses. For example, the following query is $ where:

db.things.find( "this.a % 10 == 1")

can be replaced by:

db.things.find( { a : { $mod : [ 10 , 1 ] } } )

Therefore, I did not understand what it means fast. Performance?

+5
source share
2 answers

, , , . -, "$ where" javascript , "$ mod" - mongodb, , - javascript . :

Javascript executes more slowly than the native operators listed on this page, 
but is very flexible.

http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-JavascriptExpressionsand%7B%7B%24where%7D%7D

+3

javascript/regex mongodb . , .

javascript

+1

All Articles