【MongoDB】The high Query operation of MongoDB(一)
2014-09-21 23:19
351 查看
In the last blog, we talked about the basic operation of MongoDB, including insert, query, remove and update. Now in this blog, we will further hava a good understanding of querying operation.
At first, let's create 1000 recors for testing. As the following picture depicts.
![](http://img.blog.csdn.net/20140921214022217?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3hiMDg0MTkwMTExNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
Condition Expression
1. <, <=, >, <= is correspondent to ‘$lt’,'$Ite', '$gt' and '$gte'
![](http://img.blog.csdn.net/20140921215333154?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3hiMDg0MTkwMTExNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
2. $all
This operation is analogous to the $in operation. But the difference is that $all operation requires every elements in the array to be included in the return result.
![](http://img.blog.csdn.net/20140921224417218?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3hiMDg0MTkwMTExNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
3. $exists
$exists operation check whether one field exists.
At first, let's create 1000 recors for testing. As the following picture depicts.
Condition Expression
1. <, <=, >, <= is correspondent to ‘$lt’,'$Ite', '$gt' and '$gte'
2. $all
This operation is analogous to the $in operation. But the difference is that $all operation requires every elements in the array to be included in the return result.
3. $exists
$exists operation check whether one field exists.
相关文章推荐
- 【MongoDB】The high query operation of MongoDB(二)
- 【MongoDB】The high query operation of MongoDB(三)
- 【MonogoDB】The high update operation of MongoDB
- 【MongoDB】The basic operation of Mongodb, Insert\Query\Delete\Update
- 【MongoDB】The basic operation of Index in MongoDB
- 遇到错误----Mongodb----导出数据报错 Sort operation used more than the maximum 33554432 bytes of RAM
- 【MongoDB】The basic operation of Index in MongoDB
- Mongodb: Sort operation used more than the maximum 33554432 bytes of RAM
- 【MongoDB】The basic operation of Index in MongoDB
- 【MongoDB】The Regex Expression query of MongoDB
- Internal Query Processor Error: The query processor ran out of stack space during query optimization.
- Grid Computing: The New Frontier of High Performance Computing
- How do I write a LINQ to Entities query which has the equivalent of the SQL “in” keyword?
- 查询优化的具体步骤(The Phases of Query Optimization)
- org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the sel
- High Performance Computing in Science and Engineering ' 05 : Transactions of the High Performance Co
- query the list of factor on performance impact
- Holding high the flag of Reform & Opening-up
- Rule 6: Put Scripts at the Bottom(Chapter 6 of High performance Web Sites)
- The secrets of High-Energy People