Redis Learning notes have been completed, Redis warehousing has been implemented, for the key/value structure of Redis I prefer to use it to implement the caching mechanism of the data set, but for the structure of flexible, high query efficiency
These days through reading and find information, learning the Shard cluster mode, at first I really did not see too understand
Feelings are mostly tangled in the relationship between several concepts
Configure the server
Sharding
Ricky Ho, a software engineer, recently published a blog post on the MongoDB architecture (MongoDB Architecture), although this is a very broad-sounding topic, However, in the article, the author does an analysis of the internal-to-external
If the type writes an error, it can be modified in the command line in the following way.Db.jobtracker_data.find ({' collect_time ': {$type: 2}}). ForEach (function (x) { x.collect_time = parseint (x.collect _time); Db.jobtracker_data.save (x);
Limit the number of returned numbers for the result to use limit, skipSort uses an object as a parameter: a set of key/value pairs, keys that correspond to the key names of the document, values that represent the direction of the sort (1: Ascending,
Flush () is the force output of the buffer data (note not to be confused with Frush () refresh). mainly used in Io, that is, to empty the buffer data, generally in the read and write stream (stream), the data is read into the memory, and then write
Use MongoDB as a database under Ubuntu.Installation:I use the 64-bit system to download at this URL:Http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.4.4.tgz32-bit:Http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.4.tgzAlways see
Emergency out of a bad, but can not continue to write, write less, first put Shard key and hash of some small concepts continue to write.Shard KeysThe most important thing about MongoDB's sharding is Shard key. Shard with Shard Key, and divide and
MongoDB Common Command Scripting-automated OPS writes the MONGODB commands commonly used in operations into shell scripts, greatly facilitates maintenance1 Modifying the settings of a replica set#!/bin/bash#mongodb Enter the client and enter
NoSQL databases such as MongoDB have the advantages of scalability and high performance, but the computational power is weaker than traditional SQL, such as MongoDB's grouping result is not too large, and does not directly support join operations,
A few days ago because of the project to use the MongoDB database, the exhaust in the official website to download a installation package, in fact, this installation package installation process is equivalent to the decompression process, but the
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.9.tgzExtractTar xvf mongodb-linux-x86_64-2.6.9.tgzChange Folder nameMV Mongodb-linux-x86_64-1.8.5/mongodbMove to the Data directoryMV Mongodb/dataNew Data File storage
With the version of the update, the use of MongoDB in the business also made version upgrades, but in the drop off a database, the problem came, the original user with the deletion of the library is also deleted, but again want to through the
Delete a collection in the shell, execute db.test.drop () or Db.runcommand ({"Drop": "Test"}), and the commands in MongoDB are actually implemented as a special type of query that executes against the $cmd collection, RunCommand simply accepts the
After the successful start of MongoDB, and then open a command line window input MONGO, you can do some of the database operations.Enter help to see the basic Operations Command:Show DBS: Display Database listShow Collections: Displays a collection
I see the state of the query here is 0, the previous data of the state is not 1, the solution is to repair the data.Db.repairdatabase ()As for the reasons for inconsistent data, I am not very clear, after a variety of information queryMay be in the
1. Install the downloaded MongoDB on the E-drive E:\MongoDB2. Go to the Bin directory to execute mongod--dbpath "E:\MongoDB\data" Enter, close the current CMD window3. Create a new Logs folder in the MongoDB directory to store the log files4. Create
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