Some summary of MongoDB usage

Source: Internet
Author: User
  1. All query writes as much as possible with a time-out
  2. Bulk interfaces are used when large volumes are written
  3. Build index as far as possible to specify as background execution
  4. Indexes are built too much to have a certain effect on write performance, so when you build an index, you have several common fields that cover most of the data. There is a real need to add a few fields that are not covered to create a new index.
  5. When accessing the replica set, ensure that the MongoDB URI contains all the machines in the replica set for load balancing and high availability.
  6. When accessing a shard cluster, be sure to include 2 or more MONGOs addresses in the MongoDB URI for load balancing and high availability.
  7. Combined index field order: Match condition before, range condition behind
  8. Don't be afraid of data redundancy, but if the data values of a field are often changed, it's less appropriate to be heavily redundant to other documents or other collections.
  9. I want to add ...


This article is from "Brother Meng, Kahn" blog, please be sure to keep this source http://xjf721.blog.51cto.com/889836/1902035

Some summary of MongoDB usage

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.