What's the matter MongoDB.
MongoDB is written by the C + + language and is an open source database system based on distributed file storage.
In the case of high load, adding more nodes can guarantee the performance of the server.
MongoDB is designed
MongoDB versus RDBMS Where statement comparison
Operation
format
Example
similar statements in an RDBMS
Equals
{:}
db.col.find({"by":"XXXX"}).pretty()
where by = ‘XXXX‘
When you need bulk operations, you can save network connection interactions and use Bulk_write.Set Ordered=false because there is no dependency in the bulk operation, and if there is an interdependence after the cyanide, it needs to be set to
1. The SOLR field is written to death.
2 SOLR advantages: fuzzy query of large text, MongoDB also supports regular query and js-like syntaxCodeStatement Query
3 MongoDB already supports local updates and an upsert. The SOLR will be updated first,
Add Field{$ Set: {"field": 1 }})Delete Field{$ Unset: {"field": 1 }})
Query elements in an array{"Keyword": {$ All: ["location", "other"]}
Add array elements (repeated elements are not added){"$ Addtoset": {"keyword": {"$ each": ["location",
Recently, due to project requirements, MongoDB is used to store data. Frankly speaking, it is quite disappointing. Of course, the reason why I am not familiar with MongoDB is not ruled out. But in general, MongoDB still has a long way to go if you
Today, I looked at the MongoDB version and found that it has changed again. The release speed of this version is really fast enough. So I downloaded a new version for installation. The previous version was installed on Windows, for Linux 86, follow
To partition the collection objects stored in the MongoDB database, you need to select the shard key. The selection of the shard key directly determines whether the data distribution in the cluster is balanced and whether the cluster performance is
MongoDB supports multiple languages and is driven by multiple languages.
This blog mainly introduces how to MongoDB storage and read files premise: Download the corresponding driver: Official website download:
My system is Ubuntu 12.10
First, add the key:
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
An error occurs as soon as it comes up:
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring
MongoDB has many advantages, such as multi-column indexes. Some statistical functions can be used for queries and multi-condition queries are supported. However, multi-table queries are not currently supported, you can try to solve the problem of
When using MySQL and Oracle for image storage, files are directly uploaded to the server and stored in a fixed directory on the hard disk. Only the path is stored in the table. Now we can use MongoDB to learn about MongoDB gridfs. MongoDB gridfs is
/Files/hanguoji/mongodbw.w.w.w.rar
MongoDB authoritative Introduction: http://www.cnblogs.com/silentcross/archive/2011/06/27/2091530.html
Query:MySQL:Select * from userMongo:DB. User. Find ()
MySQL:Select * from user where name = 'starlil'Mongo:DB.
Find query is the most basic and commonly used syntax in MongoDB. It is also very easy to use. Some basic operations of find are listed below.> DB. news. find () // select * from [News] {"_ id": 10001, "Count": 1, "news": "I hava a dream", "Time ":
Skip the theory. I have introduced automatic sharding on the internet... directly go to the configuration. Please leave a message if you have any questions.
Or test with million data
Insert million pieces of data to a database without sharding.
Data
Test environment: php_cmd.dll of PHP5.3 + mongo-1.1.4-php5.3vc6ts
We can use stat to observe and find that:
1. mongostat also occupies a database connection.
2. PHP's mongo extension uses transient connections, similar to the Code: new Mongo
Mongostat is a state detection tool that comes with mongdb. It is used in the command line. It will get the current running status of mongodb at a fixed interval and output it. If you find that the database suddenly slows down or has other problems,
Recently, due to the business needs of the product, you need to use a relatively large amount of data for computing. By the way, try the mapreduce function of mongodb, and it feels pretty good.
The following is an official example:
$ ./mongo>
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service