[MongoDB] The high query operation of MongoDB (III), mongodboperation1, Sort
Needless to say, mongodb also support to sort data. THe positive one means sorting by asc order and negetive means by desc.
2. Group
The grammar of group:
Description Of Argument:
Key: The field need to group
Cond:
MongoDB Introduction
MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications.
MongoDB is a product between relational database and non relational database, and is the most powerful and relational database in the relational database.
Here a
[MongoDB] The Regex Expression query of MongoDB, mongodbregex
In the past two blogs, the topic mainly focus on the high query operation of mongodb. in this blog, we simply study the regex expression in the mongdb. mongoDB also sup
PHP simple MongoDB operation method (installation, addition, deletion, modification, and query), mongodb addition and Deletion
This article describes how to operate MongoDB in PHP. We will share this with you for your reference. The details are as follows:
For php operations on Mon
Dex introduces mongodb index and query analyzer dex. It is a MongoDB performance adjustment tool that compares MongoDB log files and index entries and provides index recommendations. Currently, you must provide a URI to connect to the database. Dex only recommends full index
Tags: format composite need to import collection data export God nbsp Share picture, two tools are located in the bin directory of the MongoDB installation directory Here's how they are used:OneExport Tool MongoexportThe Mongoexport tool in MongoDB can export a collection to a file in JSON or CSV format. You can spe
Tags: mongodb nosqlFirst, Introduction Our last article introduced Db.collection.find () can be implemented based on conditional queries and specifying fields returned using the projection operator omit this parameter to return all fields in the matching document, we present today the query operations for array and inline documents, especially for the $ Elemmatch can also use the second parameter of the Fin
Clever Use of Mongodb for geographic space query, mongodb geographical space
MongoDB is a distributed file storage-based database. Written in C ++. It is designed to provide scalable, high-performance data storage solutions for WEB applications.In mobile development, positioning functions are often used, such as Meitu
Operation 3: Enable slow query logs for mongodb and mysql, start mongodb from the configuration file, and enable mongodbmysql
1.
Start mongodb from the configuration file
Create a configuration file:/usr/local/mongodb/etc/mongodb.
Mongodb deduplication, aggregation, query explanation, mongodb Aggregation
I recently learned about mongodb and some people understand it:
1. deduplication
Repeated template. getCollection (collectionName). distinct () returns the list set, which is the result after deduplication.
2. Aggregation
Aggregation aggre
, indicating that the recordis a meet the requirements. As for this example, it is certainly easy to do so with other queries. It's easy to demonstrate and easy to do. $where Query method is suitable for complexof the query. It's very powerful, but it's not recommended, it's going to sacrifice performance, but I don't know about that. As for what to add, think about it later.(9) Limit () function: How many
Label:1. MongoDB starts from a configuration file Create configuration file:/usr/local/mongodb/etc/mongodb.conf The contents of the configuration file are: #Directory and relavent set
DBPath =/var/mongodb/data
logpath =/var/mongodb/logs/log.log
profile=2
slowms=100
#repairpath =/var/
[MongoDB] The high query operation of MongoDB (2), mongodboperation
In the last blog, there are three query condition to be described. In the blog, we will continue to what we have leaned in the last blog.1 $ mod
'$ Mod' operation is able to make us to do simple mod operation, but is no need to use where sentence.
\2.
Tags: style blog http color io strong SP data onMONGOBD's query is plainly a find () method. But it's still a little complicated. Come on(1) Query all data: DB. Collection name. Find (); There's nothing to say.(2) Query the first data: DB. Set name. FindOne (); There's nothing to say.(3) Condition query: DB. Set name.
MongoDB entry-add, delete, modify, and query-mongodb entry-add, delete
Mongodb has been successfully started in the previous blog: continue. Open another cmd and enter the [mongo] command to open the shell, that is, the mongodb client. The "test" database is connected by de
The best MongoDB Client Management tool, Chszs, cannot be reproduced without the permission of the blogger. Permission to reprint should be marked by the author and blog home: Http://blog.csdn.net/chszsA good MongoDB client management tool can greatly improve the development efficiency of
modulo and equals the specified valueGrammar: [SQL]View PlainCopy
{field: {$mod: [Value, value2]}}
For the element field value, modulo the value of value to value2 the document data Example: [SQL]View PlainCopy
>db.orders.find ({"age": {$mod: [5,1]}})
For the value of the age element and 5 modulo, the value of the modulo is equal to 1 of the document data (8) Null lookup element does not exist and the element corresponds to a document with a value of NULLG
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.